summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/2011-12-28-vselecti8.ll
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2011-12-28 13:08:20 +0000
committerNadav Rotem <nadav.rotem@intel.com>2011-12-28 13:08:20 +0000
commit6059b836959f4c1f1da651779d03d0de37f74a8f (patch)
treee294fccd65051cd2ec1e168cc89f8a66edcf3560 /test/CodeGen/X86/2011-12-28-vselecti8.ll
parent021c0a2ee7121c4ccd0765699c14f8c9f7f7c596 (diff)
downloadllvm-6059b836959f4c1f1da651779d03d0de37f74a8f.tar.gz
llvm-6059b836959f4c1f1da651779d03d0de37f74a8f.tar.bz2
llvm-6059b836959f4c1f1da651779d03d0de37f74a8f.tar.xz
PR11662.
Promotion of the mask operand needs to be done using PromoteTargetBoolean, and not padded with garbage. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2011-12-28-vselecti8.ll')
-rw-r--r--test/CodeGen/X86/2011-12-28-vselecti8.ll20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2011-12-28-vselecti8.ll b/test/CodeGen/X86/2011-12-28-vselecti8.ll
new file mode 100644
index 0000000000..dbc122ac6e
--- /dev/null
+++ b/test/CodeGen/X86/2011-12-28-vselecti8.ll
@@ -0,0 +1,20 @@
+; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s
+; ModuleID = '<stdin>'
+target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
+target triple = "x86_64-apple-darwin11.2.0"
+
+; CHECK: @foo8
+; CHECK: psll
+; CHECK: psraw
+; CHECK: pblendvb
+; CHECK: ret
+define void @foo8(float* nocapture %RET) nounwind {
+allocas:
+ %resultvec.i = select <8 x i1> <i1 false, i1 true, i1 false, i1 true, i1 false, i1 true, i1 false, i1 true>, <8 x i8> <i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8>, <8 x i8> <i8 100, i8 100, i8 100, i8 100, i8 100, i8 100, i8 100, i8 100>
+ %uint2float = uitofp <8 x i8> %resultvec.i to <8 x float>
+ %ptr = bitcast float * %RET to <8 x float> *
+ store <8 x float> %uint2float, <8 x float>* %ptr, align 4
+ ret void
+}
+
+