Pull in r301983 from upstream llvm trunk (by Tim Northover):
ARM: avoid handing a deleted node back to TableGen during ISel. When we replaced the multiplicand the destination node might already exist. When that happens the original gets CSEd and deleted. However, it's actually used as the offset so nonsense is produced. Should fix PR32726. This fixes an assertion failure when building building www/firefox 53.0 for arm. Reported by: Bob Prohaska PR: 218782 MFC after: 3 days
This commit is contained in:
parent
c0b72375d8
commit
cddf3eadbd
@ -748,7 +748,9 @@ bool ARMDAGToDAGISel::SelectLdStSOReg(SDValue N, SDValue &Base, SDValue &Offset,
|
||||
unsigned PowerOfTwo = 0;
|
||||
SDValue NewMulConst;
|
||||
if (canExtractShiftFromMul(Offset, 31, PowerOfTwo, NewMulConst)) {
|
||||
HandleSDNode Handle(Offset);
|
||||
replaceDAGValue(Offset.getOperand(1), NewMulConst);
|
||||
Offset = Handle.getValue();
|
||||
ShAmt = PowerOfTwo;
|
||||
ShOpcVal = ARM_AM::lsl;
|
||||
}
|
||||
@ -1428,7 +1430,9 @@ bool ARMDAGToDAGISel::SelectT2AddrModeSoReg(SDValue N,
|
||||
unsigned PowerOfTwo = 0;
|
||||
SDValue NewMulConst;
|
||||
if (canExtractShiftFromMul(OffReg, 3, PowerOfTwo, NewMulConst)) {
|
||||
HandleSDNode Handle(OffReg);
|
||||
replaceDAGValue(OffReg.getOperand(1), NewMulConst);
|
||||
OffReg = Handle.getValue();
|
||||
ShAmt = PowerOfTwo;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user