1; RUN: llc < %s -mtriple=x86_64-linux-pc -mcpu=penryn | FileCheck %s
2
3; Ensure PSRAD is generated as the condition is consumed by both PADD and
4; BLENDVPS. PAND requires all bits setting properly.
5
6define <4 x i32> @foo(<4 x i32>* %p, <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) {
7  %sext_cond = sext <4 x i1> %cond to <4 x i32>
8  %t1 = add <4 x i32> %v1, %sext_cond
9  %t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2
10  store <4 x i32> %t2, <4 x i32>* %p
11  ret <4 x i32> %t1
12; CHECK: foo
13; CHECK: pslld
14; CHECK: psrad
15; CHECK: ret
16}
17