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 | 26edb291ace843dba8ee775ae81ffb74bb129fce (patch) | |
tree | c48de565596949a32183d7cf6de66d42a4cd3f59 /llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll | |
parent | b6033396fd935dd053639d5e31c49b7f2f58c2ef (diff) | |
download | bcm5719-llvm-26edb291ace843dba8ee775ae81ffb74bb129fce.tar.gz bcm5719-llvm-26edb291ace843dba8ee775ae81ffb74bb129fce.zip |
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.
llvm-svn: 146150
Diffstat (limited to 'llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll')
-rw-r--r-- | llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll b/llvm/test/CodeGen/X86/2011-12-8-bitcastintprom.ll new file mode 100644 index 00000000000..ceee8e6041e --- /dev/null +++ b/llvm/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 +} + |