1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=x86_64-unknown -mattr=-sse4.2,+sse4.1 < %s | FileCheck %s
4 ; Make sure we don't load from the location pointed to by %p
5 ; twice: it has non-obvious performance implications, and
6 ; the relevant transformation doesn't know how to update
7 ; the chains correctly.
10 define <4 x i32> @test(ptr %p) {
13 ; CHECK-NEXT: cmpl $3, 8(%rdi)
14 ; CHECK-NEXT: je .LBB0_1
15 ; CHECK-NEXT: # %bb.2:
16 ; CHECK-NEXT: xorps %xmm0, %xmm0
18 ; CHECK-NEXT: .LBB0_1:
19 ; CHECK-NEXT: movaps (%rdi), %xmm0
21 %v = load <4 x i32>, ptr %p
22 %e = extractelement <4 x i32> %v, i32 2
23 %cmp = icmp eq i32 %e, 3
24 %sel = select i1 %cmp, <4 x i32> %v, <4 x i32> zeroinitializer