[llvm] r250651 - Move one-use variable inside test. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 18 04:47:24 PDT 2015
Author: rksimon
Date: Sun Oct 18 06:47:23 2015
New Revision: 250651
URL: http://llvm.org/viewvc/llvm-project?rev=250651&view=rev
Log:
Move one-use variable inside test. NFC.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=250651&r1=250650&r2=250651&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sun Oct 18 06:47:23 2015
@@ -3876,7 +3876,6 @@ SDValue SelectionDAG::getNode(unsigned O
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 O
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
More information about the llvm-commits
mailing list