aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-07-15 20:39:08 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-07-15 20:39:08 +0000
commit46646572f76513e39bcdd0e06c66668ec1caf5bc (patch)
tree69e68f064dc6bf83e13e6eba969feaaa65a89cc7 /test/CodeGen
parentd896e242993fd04c013dda8987c232cdcab63dd4 (diff)
downloadexternal_llvm-46646572f76513e39bcdd0e06c66668ec1caf5bc.zip
external_llvm-46646572f76513e39bcdd0e06c66668ec1caf5bc.tar.gz
external_llvm-46646572f76513e39bcdd0e06c66668ec1caf5bc.tar.bz2
Fix a bug in the scalarization of BUILD_VECTOR. BUILD_VECTOR elements may be wider than the output element type. Make sure to trunc them if needed.
Together with Michael Kuperstein <michael.m.kuperstein@intel.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll b/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll
new file mode 100644
index 0000000..6591c64
--- /dev/null
+++ b/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll
@@ -0,0 +1,8 @@
+; RUN: llc -mcpu=corei7 < %s
+; We don't care about the output, just that it doesn't crash
+
+define <1 x i1> @buildvec_promote() {
+ %cmp = icmp ule <1 x i32> undef, undef
+ %sel = select i1 undef, <1 x i1> undef, <1 x i1> %cmp
+ ret <1 x i1> %sel
+}