From 46646572f76513e39bcdd0e06c66668ec1caf5bc Mon Sep 17 00:00:00 2001 From: Nadav Rotem Date: Sun, 15 Jul 2012 20:39:08 +0000 Subject: 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160235 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll (limited to 'test/CodeGen/Generic') 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 +} -- cgit v1.1