27 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=x86_64-unknown -mattr=-sse4.2,+sse4.1 < %s | FileCheck %s3 4; Make sure we don't load from the location pointed to by %p5; twice: it has non-obvious performance implications, and6; the relevant transformation doesn't know how to update7; the chains correctly.8; PR107479 10define <4 x i32> @test(ptr %p) {11; CHECK-LABEL: test:12; CHECK: # %bb.0:13; CHECK-NEXT: cmpl $3, 8(%rdi)14; CHECK-NEXT: je .LBB0_115; CHECK-NEXT: # %bb.2:16; CHECK-NEXT: xorps %xmm0, %xmm017; CHECK-NEXT: retq18; CHECK-NEXT: .LBB0_1:19; CHECK-NEXT: movaps (%rdi), %xmm020; CHECK-NEXT: retq21 %v = load <4 x i32>, ptr %p22 %e = extractelement <4 x i32> %v, i32 223 %cmp = icmp eq i32 %e, 324 %sel = select i1 %cmp, <4 x i32> %v, <4 x i32> zeroinitializer25 ret <4 x i32> %sel26}27