diff options
| author | Matthias Braun <matze@braunis.de> | 2015-01-13 22:17:46 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-01-13 22:17:46 +0000 |
| commit | f50ab43214d5d0aa6e999accf2066e86b1f4f74c (patch) | |
| tree | 3176b0cc8b3927bfe3f7538a85118f6960cca9ea /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | c67a774e17b94b037507c74b6e48ea3c4f5bca9d (diff) | |
| download | bcm5719-llvm-f50ab43214d5d0aa6e999accf2066e86b1f4f74c.tar.gz bcm5719-llvm-f50ab43214d5d0aa6e999accf2066e86b1f4f74c.zip | |
DAGCombiner: simplify by using condition variables; NFC
llvm-svn: 225836
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 20eaa2965e2..f271bd5122e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -3383,8 +3383,9 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N1, } // Perform trivial constant folding. - SDValue SV = FoldConstantArithmetic(Opcode, VT, N1.getNode(), N2.getNode()); - if (SV.getNode()) return SV; + if (SDValue SV = + FoldConstantArithmetic(Opcode, VT, N1.getNode(), N2.getNode())) + return SV; // Canonicalize constant to RHS if commutative. if (N1C && !N2C && isCommutativeBinOp(Opcode)) { |

