[llvm] 35c7b1a - [DAG] SimplifyVBinOp - remove FoldConstantArithmetic call.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 17 09:22:30 PST 2021
Author: Simon Pilgrim
Date: 2021-12-17T17:22:23Z
New Revision: 35c7b1aeae75bd2c3be57eb506385cd24007a47d
URL: https://github.com/llvm/llvm-project/commit/35c7b1aeae75bd2c3be57eb506385cd24007a47d
DIFF: https://github.com/llvm/llvm-project/commit/35c7b1aeae75bd2c3be57eb506385cd24007a47d.diff
LOG: [DAG] SimplifyVBinOp - remove FoldConstantArithmetic call.
Constant folding (scalar/vector) is now consistently handled before the SimplifyVBinOp calls.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index fe0e861de0d2..b58758b4253b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -22618,12 +22618,6 @@ SDValue DAGCombiner::SimplifyVBinOp(SDNode *N, const SDLoc &DL) {
unsigned Opcode = N->getOpcode();
SDNodeFlags Flags = N->getFlags();
- // See if we can constant fold the vector operation.
- // TODO: This isn't vector-specific any more - remove me.
- if (SDValue Fold = DAG.FoldConstantArithmetic(Opcode, SDLoc(LHS),
- LHS.getValueType(), Ops))
- return Fold;
-
// Move unary shuffles with identical masks after a vector binop:
// VBinOp (shuffle A, Undef, Mask), (shuffle B, Undef, Mask))
// --> shuffle (VBinOp A, B), Undef, Mask
More information about the llvm-commits
mailing list