diff options
Diffstat (limited to 'test/CodeGen/X86/pr18014.ll')
-rw-r--r-- | test/CodeGen/X86/pr18014.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGen/X86/pr18014.ll b/test/CodeGen/X86/pr18014.ll new file mode 100644 index 0000000000..e3860b88bf --- /dev/null +++ b/test/CodeGen/X86/pr18014.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=x86_64-linux-pc -mcpu=penryn | FileCheck %s + +; Ensure PSRAD is generated as the condition is consumed by both PADD and +; BLENDVPS. PAND requires all bits setting properly. + +define <4 x i32> @foo(<4 x i32>* %p, <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) { + %sext_cond = sext <4 x i1> %cond to <4 x i32> + %t1 = add <4 x i32> %v1, %sext_cond + %t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2 + store <4 x i32> %t2, <4 x i32>* %p + ret <4 x i32> %t1 +; CHECK: foo +; CHECK: pslld +; CHECK: psrad +; CHECK: ret +} |