summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNadav Rotem <nadav.rotem@intel.com>2012-01-18 08:33:18 +0000
committerNadav Rotem <nadav.rotem@intel.com>2012-01-18 08:33:18 +0000
commit819026f2f8b13ac7f6051727fce54b95868c3d85 (patch)
tree6c5a45881ac41724bc8268306781eae82f937ff2 /test
parentcd7f02bb43ec07e0a2bd6d90177b353c94408586 (diff)
downloadllvm-819026f2f8b13ac7f6051727fce54b95868c3d85.tar.gz
llvm-819026f2f8b13ac7f6051727fce54b95868c3d85.tar.bz2
llvm-819026f2f8b13ac7f6051727fce54b95868c3d85.tar.xz
Fix a bug in the type-legalization of vector integers. When we bitcast one vector type to another, we must not bitcast the result if one type is widened while the other is promoted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148383 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/2012-01-18-vbitcast.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/2012-01-18-vbitcast.ll b/test/CodeGen/X86/2012-01-18-vbitcast.ll
new file mode 100644
index 0000000000..8a3ccc8dfd
--- /dev/null
+++ b/test/CodeGen/X86/2012-01-18-vbitcast.ll
@@ -0,0 +1,14 @@
+; RUN: llc < %s -march=x86-64 -mcpu=corei7 -mtriple=x86_64-pc-win32 | FileCheck %s
+
+;CHECK: vcast
+define <2 x i32> @vcast(<2 x float> %a, <2 x float> %b) {
+;CHECK: pshufd
+;CHECK: pshufd
+ %af = bitcast <2 x float> %a to <2 x i32>
+ %bf = bitcast <2 x float> %b to <2 x i32>
+ %x = sub <2 x i32> %af, %bf
+;CHECK: psubq
+ ret <2 x i32> %x
+;CHECK: ret
+}
+