[llvm] af5942c - Remove trailing whitespace. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 17 07:20:50 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-17T15:20:26+01:00
New Revision: af5942cc09dc7b0fc881bdd0d040d7ec80505fcb
URL: https://github.com/llvm/llvm-project/commit/af5942cc09dc7b0fc881bdd0d040d7ec80505fcb
DIFF: https://github.com/llvm/llvm-project/commit/af5942cc09dc7b0fc881bdd0d040d7ec80505fcb.diff
LOG: Remove trailing whitespace. NFC.
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 c3868b9557ff8..ddd90c3ee8b4a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3632,26 +3632,26 @@ SDValue DAGCombiner::visitSUB(SDNode *N) {
// Hoist one-use addition by non-opaque constant:
// (x + C) - y -> (x - y) + C
- if (N0.getOpcode() == ISD::ADD && N0.hasOneUse() &&
+ if (N0.getOpcode() == ISD::ADD && N0.hasOneUse() &&
isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) {
SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1);
return DAG.getNode(ISD::ADD, DL, VT, Sub, N0.getOperand(1));
}
// y - (x + C) -> (y - x) - C
- if (N1.getOpcode() == ISD::ADD && N1.hasOneUse() &&
+ if (N1.getOpcode() == ISD::ADD && N1.hasOneUse() &&
isConstantOrConstantVector(N1.getOperand(1), /*NoOpaques=*/true)) {
SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(0));
return DAG.getNode(ISD::SUB, DL, VT, Sub, N1.getOperand(1));
}
// (x - C) - y -> (x - y) - C
// This is necessary because SUB(X,C) -> ADD(X,-C) doesn't work for vectors.
- if (N0.getOpcode() == ISD::SUB && N0.hasOneUse() &&
+ if (N0.getOpcode() == ISD::SUB && N0.hasOneUse() &&
isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) {
SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1);
return DAG.getNode(ISD::SUB, DL, VT, Sub, N0.getOperand(1));
}
// (C - x) - y -> C - (x + y)
- if (N0.getOpcode() == ISD::SUB && N0.hasOneUse() &&
+ if (N0.getOpcode() == ISD::SUB && N0.hasOneUse() &&
isConstantOrConstantVector(N0.getOperand(0), /*NoOpaques=*/true)) {
SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), N1);
return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), Add);
More information about the llvm-commits
mailing list