summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-10-15 00:57:13 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-10-15 00:57:13 +0000
commitdd2b39d989e58bcad3014d8834f1af932426f9d1 (patch)
tree3196a5daf29fc4610afa07d3ec7d9e173fbaf788
parent936c75bd5109622be40431c3cf87a8eaf3d1b156 (diff)
downloadbcm5719-llvm-dd2b39d989e58bcad3014d8834f1af932426f9d1.tar.gz
bcm5719-llvm-dd2b39d989e58bcad3014d8834f1af932426f9d1.zip
Mark tADDrSPi as having side effects again.
It really doesn't, but when r141929 removed the hasSideEffects flag from this instruction, it caused miscompilations. I am guessing that it got moved across a stack pointer update. Also clear isRematerializable after checking that this instruction is in fact never rematerialized in the nightly test suite. llvm-svn: 142030
-rw-r--r--llvm/lib/Target/ARM/ARMInstrThumb.td6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrThumb.td b/llvm/lib/Target/ARM/ARMInstrThumb.td
index 3e81516726b..cedb54799db 100644
--- a/llvm/lib/Target/ARM/ARMInstrThumb.td
+++ b/llvm/lib/Target/ARM/ARMInstrThumb.td
@@ -310,9 +310,9 @@ def tPICADD : TIt<(outs GPR:$dst), (ins GPR:$lhs, pclabel:$cp), IIC_iALUr, "",
}
// ADD <Rd>, sp, #<imm8>
-// This is rematerializable, which is particularly useful for taking the
-// address of locals.
-let isReMaterializable = 1, neverHasSideEffects = 1 in
+// FIXME: This should not be marked as having side effects, and it should be
+// rematerializable. Clearing the side effect bit causes miscompilations,
+// probably because the instruction can be moved around.
def tADDrSPi : T1pI<(outs tGPR:$dst), (ins GPRsp:$sp, t_imm0_1020s4:$imm),
IIC_iALUi, "add", "\t$dst, $sp, $imm", []>,
T1Encoding<{1,0,1,0,1,?}> {
OpenPOWER on IntegriCloud