[llvm] r346118 - [DAGCombiner] Remove an unused argument from tryFoldToZero. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 4 21:53:03 PST 2018
Author: ctopper
Date: Sun Nov 4 21:53:03 2018
New Revision: 346118
URL: http://llvm.org/viewvc/llvm-project?rev=346118&view=rev
Log:
[DAGCombiner] Remove an unused argument from tryFoldToZero. NFC
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=346118&r1=346117&r2=346118&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Nov 4 21:53:03 2018
@@ -2540,8 +2540,7 @@ SDValue DAGCombiner::visitADDCARRYLike(S
// Since it may not be valid to emit a fold to zero for vector initializers
// check if we can before folding.
static SDValue tryFoldToZero(const SDLoc &DL, const TargetLowering &TLI, EVT VT,
- SelectionDAG &DAG, bool LegalOperations,
- bool LegalTypes) {
+ SelectionDAG &DAG, bool LegalOperations) {
if (!VT.isVector())
return DAG.getConstant(0, DL, VT);
if (!LegalOperations || TLI.isOperationLegal(ISD::BUILD_VECTOR, VT))
@@ -2568,7 +2567,7 @@ SDValue DAGCombiner::visitSUB(SDNode *N)
// fold (sub x, x) -> 0
// FIXME: Refactor this and xor and other similar operations together.
if (N0 == N1)
- return tryFoldToZero(DL, TLI, VT, DAG, LegalOperations, LegalTypes);
+ return tryFoldToZero(DL, TLI, VT, DAG, LegalOperations);
if (DAG.isConstantIntBuildVectorOrConstantInt(N0) &&
DAG.isConstantIntBuildVectorOrConstantInt(N1)) {
// fold (sub c1, c2) -> c1-c2
@@ -6154,7 +6153,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N)
// fold (xor x, x) -> 0
if (N0 == N1)
- return tryFoldToZero(SDLoc(N), TLI, VT, DAG, LegalOperations, LegalTypes);
+ return tryFoldToZero(SDLoc(N), TLI, VT, DAG, LegalOperations);
// fold (xor (shl 1, x), -1) -> (rotl ~1, x)
// Here is a concrete example of this equivalence:
More information about the llvm-commits
mailing list