25 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=sse4.1 | FileCheck %s3 4; Ensure PSRAD is generated as the condition is consumed by both PADD and5; BLENDVPS. PADD requires all bits setting properly.6 7define <4 x i32> @foo(ptr %p, <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) {8; CHECK-LABEL: foo:9; CHECK: # %bb.0:10; CHECK-NEXT: pslld $31, %xmm011; CHECK-NEXT: movdqa %xmm0, %xmm312; CHECK-NEXT: psrad $31, %xmm313; CHECK-NEXT: paddd %xmm1, %xmm314; CHECK-NEXT: blendvps %xmm0, %xmm1, %xmm215; CHECK-NEXT: movaps %xmm2, (%rdi)16; CHECK-NEXT: movdqa %xmm3, %xmm017; CHECK-NEXT: retq18 %sext_cond = sext <4 x i1> %cond to <4 x i32>19 %t1 = add <4 x i32> %v1, %sext_cond20 %t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v221 store <4 x i32> %t2, ptr %p22 ret <4 x i32> %t123}24 25