diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:11 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-09-20 00:33:11 +0000 |
commit | c2286720de4f665dc2750d54c3748d331f81e105 (patch) | |
tree | 57d18a4b8a447736cc7b4e6246ad03e9b41994e5 /lib | |
parent | 5cfcb3677ade67e563f2746bce67904a9c0d842b (diff) | |
download | external_llvm-c2286720de4f665dc2750d54c3748d331f81e105.zip external_llvm-c2286720de4f665dc2750d54c3748d331f81e105.tar.gz external_llvm-c2286720de4f665dc2750d54c3748d331f81e105.tar.bz2 |
Add braces to suppress Clang's dangling-else warning.
These violations were introduced in r191049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index a565da5..b355cc9 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3420,7 +3420,7 @@ SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, SDLoc DL) { // fold (or (shl x, (*ext y)), (srl x, (*ext (sub 32, y)))) -> // (rotr x, (sub 32, y)) if (ConstantSDNode *SUBC = - dyn_cast<ConstantSDNode>(RExtOp0.getOperand(0))) + dyn_cast<ConstantSDNode>(RExtOp0.getOperand(0))) { if (SUBC->getAPIntValue() == OpSizeInBits) { return DAG.getNode(HasROTL ? ISD::ROTL : ISD::ROTR, DL, VT, LHSShiftArg, @@ -3442,6 +3442,7 @@ SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, SDLoc DL) { return DAG.getNode(LHSShiftArg.getOpcode(), DL, VT, V).getNode(); } } + } } else if (LExtOp0.getOpcode() == ISD::SUB && RExtOp0 == LExtOp0.getOperand(1)) { // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext y))) -> @@ -3449,7 +3450,7 @@ SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, SDLoc DL) { // fold (or (shl x, (*ext (sub 32, y))), (srl x, (*ext y))) -> // (rotl x, (sub 32, y)) if (ConstantSDNode *SUBC = - dyn_cast<ConstantSDNode>(LExtOp0.getOperand(0))) + dyn_cast<ConstantSDNode>(LExtOp0.getOperand(0))) { if (SUBC->getAPIntValue() == OpSizeInBits) { return DAG.getNode(HasROTR ? ISD::ROTR : ISD::ROTL, DL, VT, LHSShiftArg, @@ -3471,6 +3472,7 @@ SDNode *DAGCombiner::MatchRotate(SDValue LHS, SDValue RHS, SDLoc DL) { return DAG.getNode(RHSShiftArg.getOpcode(), DL, VT, V).getNode(); } } + } } } |