[llvm-commits] [llvm] r167488 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/Analysis/CostModel/X86/cast.ll
Nadav Rotem
nrotem at apple.com
Tue Nov 6 13:17:18 PST 2012
Author: nadav
Date: Tue Nov 6 15:17:17 2012
New Revision: 167488
URL: http://llvm.org/viewvc/llvm-project?rev=167488&view=rev
Log:
CostModel: add another known vector trunc optimization.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/Analysis/CostModel/X86/cast.ll
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=167488&r1=167487&r2=167488&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Nov 6 15:17:17 2012
@@ -17692,6 +17692,7 @@
{ ISD::FP_TO_SINT, MVT::v4i8, MVT::v4f32, 1 },
{ ISD::ZERO_EXTEND, MVT::v8i32, MVT::v8i1, 6 },
{ ISD::SIGN_EXTEND, MVT::v8i32, MVT::v8i1, 9 },
+ { ISD::TRUNCATE, MVT::v8i32, MVT::v8i64, 3 },
};
if (ST.hasAVX()) {
Modified: llvm/trunk/test/Analysis/CostModel/X86/cast.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/CostModel/X86/cast.ll?rev=167488&r1=167487&r2=167488&view=diff
==============================================================================
--- llvm/trunk/test/Analysis/CostModel/X86/cast.ll (original)
+++ llvm/trunk/test/Analysis/CostModel/X86/cast.ll Tue Nov 6 15:17:17 2012
@@ -53,6 +53,9 @@
;CHECK: cost of 1 {{.*}} trunc
%F = trunc <8 x i32> undef to <8 x i16>
+ ;CHECK: cost of 3 {{.*}} trunc
+ %G = trunc <8 x i64> undef to <8 x i32>
+
ret i32 undef
}
More information about the llvm-commits
mailing list