summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2017-05-06 11:18:36 +0000
committerdim <dim@FreeBSD.org>2017-05-06 11:18:36 +0000
commit9bd632eb1acc41ee3fe08549b19911afc27089d2 (patch)
tree163fadd63de1c99fbe09b6fb12d0e7dbe4be0f76
parent5b1f711beb02bbe85b317f6e7ee75fdaa2cc75ad (diff)
downloadFreeBSD-src-9bd632eb1acc41ee3fe08549b19911afc27089d2.zip
FreeBSD-src-9bd632eb1acc41ee3fe08549b19911afc27089d2.tar.gz
MFC r317751:
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
-rw-r--r--contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
index c3e9591..7572955 100644
--- a/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ b/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -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;
}
}
OpenPOWER on IntegriCloud