From 30815c536baacc07e925f0aef23a5395883173dc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Thu, 20 Oct 2011 21:10:27 +0000 Subject: Vendor import of llvm release_30 branch r142614: http://llvm.org/svn/llvm-project/llvm/branches/release_30@142614 --- test/CodeGen/X86/avx-select.ll | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 test/CodeGen/X86/avx-select.ll (limited to 'test/CodeGen/X86/avx-select.ll') diff --git a/test/CodeGen/X86/avx-select.ll b/test/CodeGen/X86/avx-select.ll new file mode 100644 index 000000000000..58a75ef0a25d --- /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 +} + -- cgit v1.3