summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2015-10-18 11:47:23 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2015-10-18 11:47:23 +0000
commitc2c154e07865cf4fe6920aed0d1e61a4cdb4d24b (patch)
tree6f87885748792b3d658ea1618f8bdc2d3a938e85 /llvm/lib/CodeGen
parent696e8e0bb7847093e182bd3211cf80c999e70aef (diff)
downloadbcm5719-llvm-c2c154e07865cf4fe6920aed0d1e61a4cdb4d24b.tar.gz
bcm5719-llvm-c2c154e07865cf4fe6920aed0d1e61a4cdb4d24b.zip
Move one-use variable inside test. NFC.
llvm-svn: 250651
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 6d613436b8f..74ecb1a87bc 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -3876,7 +3876,6 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT, SDValue N1,
SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
SDValue N1, SDValue N2, SDValue N3) {
// Perform various simplifications.
- ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1);
switch (Opcode) {
case ISD::FMA: {
ConstantFPSDNode *N1CFP = dyn_cast<ConstantFPSDNode>(N1);
@@ -3913,7 +3912,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, SDLoc DL, EVT VT,
break;
}
case ISD::SELECT:
- if (N1C) {
+ if (ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1)) {
if (N1C->getZExtValue())
return N2; // select true, X, Y -> X
return N3; // select false, X, Y -> Y
OpenPOWER on IntegriCloud