diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-01-02 17:40:39 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-01-02 17:40:39 +0000 |
commit | d570f590485332113d3c5668b4acefe03570fc05 (patch) | |
tree | 2e924613b81803d83305e717eea9b4415745113d /test/CodeGen/X86/WidenArith.ll | |
parent | 351ba145a7db32b457f118ecc4d873765ac2a16b (diff) | |
download | external_llvm-d570f590485332113d3c5668b4acefe03570fc05.zip external_llvm-d570f590485332113d3c5668b4acefe03570fc05.tar.gz external_llvm-d570f590485332113d3c5668b4acefe03570fc05.tar.bz2 |
AVX: Fix a bug in WidenMaskArithmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171397 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/WidenArith.ll')
-rw-r--r-- | test/CodeGen/X86/WidenArith.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/WidenArith.ll b/test/CodeGen/X86/WidenArith.ll new file mode 100644 index 0000000..0383bd6 --- /dev/null +++ b/test/CodeGen/X86/WidenArith.ll @@ -0,0 +1,23 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx | FileCheck %s + +;CHECK: test +;CHECK: vaddps +;CHECK: vmulps +;CHECK: vsubps +;CHECK: vcmpltps +;CHECK: vcmpltps +;CHECK: vandps +;CHECK: vandps +;CHECK: ret +define <8 x i32> @test(<8 x float> %a, <8 x float> %b) { + %c1 = fadd <8 x float> %a, %b + %b1 = fmul <8 x float> %b, %a + %d = fsub <8 x float> %b1, %c1 + %res1 = fcmp olt <8 x float> %a, %b1 + %res2 = fcmp olt <8 x float> %c1, %d + %andr = and <8 x i1>%res1, %res2 + %ex = zext <8 x i1> %andr to <8 x i32> + ret <8 x i32>%ex +} + + |