diff options
| author | Nadav Rotem <nadav.rotem@intel.com> | 2012-07-15 20:39:08 +0000 |
|---|---|---|
| committer | Nadav Rotem <nadav.rotem@intel.com> | 2012-07-15 20:39:08 +0000 |
| commit | 3050e071084f38cbfff6c248c682d6113cad2b8a (patch) | |
| tree | 18f6f3278fa234fd0cec4acdb58f40b0f55870b7 /llvm/test/CodeGen/Generic | |
| parent | eec74c7279c99fbe4986b083fc5afc8be9cffaa4 (diff) | |
| download | bcm5719-llvm-3050e071084f38cbfff6c248c682d6113cad2b8a.tar.gz bcm5719-llvm-3050e071084f38cbfff6c248c682d6113cad2b8a.zip | |
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>
llvm-svn: 160235
Diffstat (limited to 'llvm/test/CodeGen/Generic')
| -rw-r--r-- | llvm/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll b/llvm/test/CodeGen/Generic/2012-07-15-BuildVectorPromote.ll new file mode 100644 index 00000000000..6591c64d871 --- /dev/null +++ b/llvm/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 +} |

