[llvm] ae8ae45 - [DAGCombine][NFC] Add braces to 'else' to match braced 'if'
Ben Shi via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 00:54:36 PDT 2022
Author: Ping Deng
Date: 2022-06-01T07:54:05Z
New Revision: ae8ae45e2a09e34a52cc38330476342bff15dbb3
URL: https://github.com/llvm/llvm-project/commit/ae8ae45e2a09e34a52cc38330476342bff15dbb3
DIFF: https://github.com/llvm/llvm-project/commit/ae8ae45e2a09e34a52cc38330476342bff15dbb3.diff
LOG: [DAGCombine][NFC] Add braces to 'else' to match braced 'if'
Reviewed By: frasercrmck
Differential Revision: https://reviews.llvm.org/D126624
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 dc2ce7f65141d..6591a68434b7b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2094,8 +2094,9 @@ static bool canFoldInAddressingMode(SDNode *N, SDNode *Use, SelectionDAG &DAG,
return false;
VT = ST->getMemoryVT();
AS = ST->getAddressSpace();
- } else
+ } else {
return false;
+ }
TargetLowering::AddrMode AM;
if (N->getOpcode() == ISD::ADD) {
@@ -2116,8 +2117,9 @@ static bool canFoldInAddressingMode(SDNode *N, SDNode *Use, SelectionDAG &DAG,
else
// [reg +/- reg]
AM.Scale = 1;
- } else
+ } else {
return false;
+ }
return TLI.isLegalAddressingMode(DAG.getDataLayout(), AM,
VT.getTypeForEVT(*DAG.getContext()), AS);
@@ -6712,8 +6714,9 @@ SDValue DAGCombiner::MatchBSwapHWord(SDNode *N, SDValue N0, SDValue N1) {
if (!(isBSwapHWordElement(N01, Parts) && isBSwapHWordPair(N00, Parts)) &&
!(isBSwapHWordElement(N00, Parts) && isBSwapHWordPair(N01, Parts)))
return SDValue();
- } else
+ } else {
return SDValue();
+ }
// Make sure the parts are all coming from the same node.
if (Parts[0] != Parts[1] || Parts[0] != Parts[2] || Parts[0] != Parts[3])
@@ -7519,8 +7522,9 @@ SDValue DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, const SDLoc &DL) {
SDValue RotX = DAG.getNode(ISD::ROTL, DL, VT, X, LHSShiftAmt);
SDValue SrlY = DAG.getNode(ISD::SRL, DL, VT, Y, RHSShiftAmt);
Res = DAG.getNode(ISD::OR, DL, VT, RotX, SrlY);
- } else
+ } else {
return SDValue();
+ }
return ApplyMasks(Res);
}
@@ -12649,8 +12653,9 @@ SDValue DAGCombiner::reduceLoadWidth(SDNode *N) {
ActiveBits = Mask.countTrailingOnes();
} else if (Mask.isShiftedMask(ShAmt, ActiveBits)) {
HasShiftedOffset = true;
- } else
+ } else {
return SDValue();
+ }
ExtType = ISD::ZEXTLOAD;
ExtVT = EVT::getIntegerVT(*DAG.getContext(), ActiveBits);
More information about the llvm-commits
mailing list