[llvm-commits] [llvm] r142030 - /llvm/trunk/lib/Target/ARM/ARMInstrThumb.td

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Oct 14 17:57:13 PDT 2011


Author: stoklund
Date: Fri Oct 14 19:57:13 2011
New Revision: 142030

URL: http://llvm.org/viewvc/llvm-project?rev=142030&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/Target/ARM/ARMInstrThumb.td

Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=142030&r1=142029&r2=142030&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Fri Oct 14 19:57:13 2011
@@ -310,9 +310,9 @@
 }
 
 // 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,?}> {





More information about the llvm-commits mailing list