diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-08 13:10:01 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-12-08 13:10:01 +0000 |
commit | 44bac7cd659090f15face5171e3c346983aeb521 (patch) | |
tree | 5e99d7ec6f06d3210a866aae8cdf8759368a13a1 /test/CodeGen/X86/2011-12-8-bitcastintprom.ll | |
parent | 72590c973837f7d56638feb511a79574391f0eac (diff) | |
download | llvm-44bac7cd659090f15face5171e3c346983aeb521.tar.gz llvm-44bac7cd659090f15face5171e3c346983aeb521.tar.bz2 llvm-44bac7cd659090f15face5171e3c346983aeb521.tar.xz |
Fix a bug in the integer-promotion of bitcast operations on vector types.
We must not issue a bitcast operation for integer-promotion of vector types, because the
location of the values in the vector may be different.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/2011-12-8-bitcastintprom.ll')
-rw-r--r-- | test/CodeGen/X86/2011-12-8-bitcastintprom.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2011-12-8-bitcastintprom.ll b/test/CodeGen/X86/2011-12-8-bitcastintprom.ll new file mode 100644 index 0000000000..ceee8e6041 --- /dev/null +++ b/test/CodeGen/X86/2011-12-8-bitcastintprom.ll @@ -0,0 +1,15 @@ +; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7 | FileCheck %s + +; Make sure that the conversion between v4i8 to v2i16 is not a simple bitcast. +; CHECK: prom_bug +; CHECK: movd +; CHECK: shufb +; CHECK: movw +; CHECK: ret +define void @prom_bug(<4 x i8> %t, i16* %p) { + %r = bitcast <4 x i8> %t to <2 x i16> + %o = extractelement <2 x i16> %r, i32 0 + store i16 %o, i16* %p + ret void +} + |