[llvm] r175759 - DAGCombiner: Make the post-legalize vector op optimization more aggressive.
Benjamin Kramer
benny.kra at googlemail.com
Thu Feb 21 07:24:35 PST 2013
Author: d0k
Date: Thu Feb 21 09:24:35 2013
New Revision: 175759
URL: http://llvm.org/viewvc/llvm-project?rev=175759&view=rev
Log:
DAGCombiner: Make the post-legalize vector op optimization more aggressive.
A legal BUILD_VECTOR goes in and gets constant folded into another legal
BUILD_VECTOR so we don't lose any legality here. The problematic PPC
optimization that made this check necessary was fixed recently.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/trunk/test/CodeGen/X86/sse2-blend.ll
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=175759&r1=175758&r2=175759&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Thu Feb 21 09:24:35 2013
@@ -9262,11 +9262,6 @@ SDValue DAGCombiner::XformToShuffleWithZ
/// SimplifyVBinOp - Visit a binary vector operation, like ADD.
SDValue DAGCombiner::SimplifyVBinOp(SDNode *N) {
- // After legalize, the target may be depending on adds and other
- // binary ops to provide legal ways to construct constants or other
- // things. Simplifying them may result in a loss of legality.
- if (LegalOperations) return SDValue();
-
assert(N->getValueType(0).isVector() &&
"SimplifyVBinOp only works on vectors!");
@@ -9336,11 +9331,6 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNo
/// SimplifyVUnaryOp - Visit a binary vector operation, like FABS/FNEG.
SDValue DAGCombiner::SimplifyVUnaryOp(SDNode *N) {
- // After legalize, the target may be depending on adds and other
- // binary ops to provide legal ways to construct constants or other
- // things. Simplifying them may result in a loss of legality.
- if (LegalOperations) return SDValue();
-
assert(N->getValueType(0).isVector() &&
"SimplifyVUnaryOp only works on vectors!");
Modified: llvm/trunk/test/CodeGen/X86/sse2-blend.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/sse2-blend.ll?rev=175759&r1=175758&r2=175759&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/sse2-blend.ll (original)
+++ llvm/trunk/test/CodeGen/X86/sse2-blend.ll Thu Feb 21 09:24:35 2013
@@ -29,7 +29,6 @@ define void at vsel_i32(<4 x i32>* %v1, <4
; Without forcing instructions, fall back to the preferred PS domain.
; CHECK: vsel_i64
; CHECK: andnps
-; CHECK: andps
; CHECK: orps
; CHECK: ret
@@ -44,7 +43,6 @@ define void at vsel_i64(<2 x i64>* %v1, <2
; Without forcing instructions, fall back to the preferred PS domain.
; CHECK: vsel_double
; CHECK: andnps
-; CHECK: andps
; CHECK: orps
; CHECK: ret
More information about the llvm-commits
mailing list