1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=sse4.1 | FileCheck %s 3 4; Ensure PSRAD is generated as the condition is consumed by both PADD and 5; BLENDVPS. PAND requires all bits setting properly. 6 7define <4 x i32> @foo(<4 x i32>* %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, %xmm0 11; CHECK-NEXT: psrad $31, %xmm0 12; CHECK-NEXT: blendvps %xmm0, %xmm1, %xmm2 13; CHECK-NEXT: paddd %xmm0, %xmm1 14; CHECK-NEXT: movaps %xmm2, (%rdi) 15; CHECK-NEXT: movdqa %xmm1, %xmm0 16; CHECK-NEXT: retq 17 %sext_cond = sext <4 x i1> %cond to <4 x i32> 18 %t1 = add <4 x i32> %v1, %sext_cond 19 %t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2 20 store <4 x i32> %t2, <4 x i32>* %p 21 ret <4 x i32> %t1 22} 23 24