diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-08-09 23:27:13 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-08-09 23:27:13 +0000 |
commit | d40aa24ebf2e67ae0802d15e1ff20373c1e9dc2f (patch) | |
tree | cd9fb262420fea0ec724e2fee078ee54e6f6ac0c /test/CodeGen/X86/avx-select.ll | |
parent | 8fa281a471d75641d75e99a017c2e4dd66bab956 (diff) | |
download | llvm-d40aa24ebf2e67ae0802d15e1ff20373c1e9dc2f.tar.gz llvm-d40aa24ebf2e67ae0802d15e1ff20373c1e9dc2f.tar.bz2 llvm-d40aa24ebf2e67ae0802d15e1ff20373c1e9dc2f.tar.xz |
Add 256-bit support for v8i32, v4i64 and v4f64 ISD::SELECT. Fix PR10556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137179 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/avx-select.ll')
-rw-r--r-- | test/CodeGen/X86/avx-select.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/X86/avx-select.ll b/test/CodeGen/X86/avx-select.ll new file mode 100644 index 0000000000..58a75ef0a2 --- /dev/null +++ b/test/CodeGen/X86/avx-select.ll @@ -0,0 +1,22 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s + +; CHECK: _select00 +; CHECK: vmovaps +; CHECK-NEXT: LBB +define <8 x i32> @select00(i32 %a, <8 x i32> %b) nounwind { + %cmpres = icmp eq i32 %a, 255 + %selres = select i1 %cmpres, <8 x i32> zeroinitializer, <8 x i32> %b + %res = xor <8 x i32> %b, %selres + ret <8 x i32> %res +} + +; CHECK: _select01 +; CHECK: vmovaps +; CHECK-NEXT: LBB +define <4 x i64> @select01(i32 %a, <4 x i64> %b) nounwind { + %cmpres = icmp eq i32 %a, 255 + %selres = select i1 %cmpres, <4 x i64> zeroinitializer, <4 x i64> %b + %res = xor <4 x i64> %b, %selres + ret <4 x i64> %res +} + |