mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-25 05:15:58 +00:00
Move one-use variable inside test. NFC.
llvm-svn: 250651
This commit is contained in:
parent
381b11d5f2
commit
9766a65452
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user