[llvm-commits] [llvm] r146150 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp test/CodeGen/X86/2011-12-8-bitcastintprom.ll test/CodeGen/X86/vec_compare-2.ll test/CodeGen/X86/widen_arith-3.ll
Nadav Rotem
nadav.rotem at intel.com
Thu Dec 8 05:10:01 PST 2011
Author: nadav
Date: Thu Dec 8 07:10:01 2011
New Revision: 146150
URL: http://llvm.org/viewvc/llvm-project?rev=146150&view=rev
Log:
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.
Added:
llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/trunk/test/CodeGen/X86/vec_compare-2.ll
llvm/trunk/test/CodeGen/X86/widen_arith-3.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp?rev=146150&r1=146149&r2=146150&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Thu Dec 8 07:10:01 2011
@@ -216,7 +216,7 @@
case TargetLowering::TypeLegal:
break;
case TargetLowering::TypePromoteInteger:
- if (NOutVT.bitsEq(NInVT))
+ if (NOutVT.bitsEq(NInVT) && !NOutVT.isVector() && !NInVT.isVector())
// The input promotes to the same size. Convert the promoted value.
return DAG.getNode(ISD::BITCAST, dl, NOutVT, GetPromotedInteger(InOp));
break;
Added: llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll?rev=146150&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll (added)
+++ llvm/trunk/test/CodeGen/X86/2011-12-8-bitcastintprom.ll Thu Dec 8 07:10:01 2011
@@ -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
+}
+
Modified: llvm/trunk/test/CodeGen/X86/vec_compare-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_compare-2.ll?rev=146150&r1=146149&r2=146150&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_compare-2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_compare-2.ll Thu Dec 8 07:10:01 2011
@@ -8,6 +8,7 @@
define void @blackDespeckle_wrapper(i8** %args_list, i64* %gtid, i64 %xend) {
entry:
+; CHECK: cfi_def_cfa_offset
; CHECK-NOT: set
; CHECK: pcmpgt
; CHECK: blendvps
Modified: llvm/trunk/test/CodeGen/X86/widen_arith-3.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/widen_arith-3.ll?rev=146150&r1=146149&r2=146150&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/widen_arith-3.ll (original)
+++ llvm/trunk/test/CodeGen/X86/widen_arith-3.ll Thu Dec 8 07:10:01 2011
@@ -1,5 +1,5 @@
; RUN: llc < %s -march=x86 -mattr=+sse42 -post-RA-scheduler=true | FileCheck %s
-; CHECK: incw
+; CHECK: incl
; CHECK: incl
; CHECK: incl
; CHECK: addl
More information about the llvm-commits
mailing list