mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Tidy up.
llvm-svn: 161132
This commit is contained in:
parent
078db59861
commit
c4b3246b76
@ -2498,8 +2498,7 @@ SDNode *ARMDAGToDAGISel::SelectABSOp(SDNode *N){
|
||||
if (Subtarget->isThumb1Only())
|
||||
return NULL;
|
||||
|
||||
if (XORSrc0.getOpcode() != ISD::ADD ||
|
||||
XORSrc1.getOpcode() != ISD::SRA)
|
||||
if (XORSrc0.getOpcode() != ISD::ADD || XORSrc1.getOpcode() != ISD::SRA)
|
||||
return NULL;
|
||||
|
||||
SDValue ADDSrc0 = XORSrc0.getOperand(0);
|
||||
@ -2510,16 +2509,10 @@ SDNode *ARMDAGToDAGISel::SelectABSOp(SDNode *N){
|
||||
EVT XType = SRASrc0.getValueType();
|
||||
unsigned Size = XType.getSizeInBits() - 1;
|
||||
|
||||
if (ADDSrc1 == XORSrc1 &&
|
||||
ADDSrc0 == SRASrc0 &&
|
||||
XType.isInteger() &&
|
||||
SRAConstant != NULL &&
|
||||
if (ADDSrc1 == XORSrc1 && ADDSrc0 == SRASrc0 &&
|
||||
XType.isInteger() && SRAConstant != NULL &&
|
||||
Size == SRAConstant->getZExtValue()) {
|
||||
|
||||
unsigned Opcode = ARM::ABS;
|
||||
if (Subtarget->isThumb2())
|
||||
Opcode = ARM::t2ABS;
|
||||
|
||||
unsigned Opcode = Subtarget->isThumb2() ? ARM::t2ABS : ARM::ABS;
|
||||
return CurDAG->SelectNodeTo(N, Opcode, VT, ADDSrc0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user