diff options
| author | Michael Liao <michael.liao@intel.com> | 2013-11-22 17:56:57 +0000 |
|---|---|---|
| committer | Michael Liao <michael.liao@intel.com> | 2013-11-22 17:56:57 +0000 |
| commit | 02160d580bac75f563cc346c3500221dbe0bcae4 (patch) | |
| tree | 43952f144fd59cabfe7d99ecd6761c0eaefc417e /llvm/test | |
| parent | f03789ca3f5592579484d49e5a07ebec3feb5aa2 (diff) | |
| download | bcm5719-llvm-02160d580bac75f563cc346c3500221dbe0bcae4.tar.gz bcm5719-llvm-02160d580bac75f563cc346c3500221dbe0bcae4.zip | |
Fix PR18014
- When simplifying the mask generation for BLEND, check whether that mask is
also consumed by other non-BLEND insns. If true, skip that simplification.
llvm-svn: 195476
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/pr18014.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/pr18014.ll b/llvm/test/CodeGen/X86/pr18014.ll new file mode 100644 index 00000000000..e3860b88bf4 --- /dev/null +++ b/llvm/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 +} |

