Explicitly mark LEApcrel pseudos with hasSideEffects.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 24 Aug 2012 21:44:11 +0000 (21:44 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Fri, 24 Aug 2012 21:44:11 +0000 (21:44 +0000)
It's not clear that they should be marked as such, but tbb formation
fails if t2LEApcrelJT is hoisted of of a loop.

This doesn't change the flags on these instructions,
UnmodeledSideEffects was already inferred from the missing pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162603 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td

index 825dd9c28baf44e04e50e9a02483bbe6fd824d19..6d701ea5d5b1c5a6d7cd5290bb3de3a65688bd59 100644 (file)
@@ -1794,12 +1794,15 @@ def ADR : AI1<{0,?,?,0}, (outs GPR:$Rd), (ins adrlabel:$label),
   let Inst{15-12} = Rd;
   let Inst{11-0} = label{11-0};
 }
+
+let hasSideEffects = 1 in {
 def LEApcrel : ARMPseudoInst<(outs GPR:$Rd), (ins i32imm:$label, pred:$p),
                     4, IIC_iALUi, []>;
 
 def LEApcrelJT : ARMPseudoInst<(outs GPR:$Rd),
                       (ins i32imm:$label, nohash_imm:$id, pred:$p),
                       4, IIC_iALUi, []>;
+}
 
 //===----------------------------------------------------------------------===//
 //  Control Flow Instructions.
index 8ecf0091d8b6a2e53c8b731e9cbd3a15a363e9a7..dbb8ffcb08b791b2ed77bdebd99ad935b7a50419 100644 (file)
@@ -1200,6 +1200,7 @@ def t2ADR : T2PCOneRegImm<(outs rGPR:$Rd),
 let neverHasSideEffects = 1, isReMaterializable = 1 in
 def t2LEApcrel   : t2PseudoInst<(outs rGPR:$Rd), (ins i32imm:$label, pred:$p),
                                 4, IIC_iALUi, []>;
+let hasSideEffects = 1 in
 def t2LEApcrelJT : t2PseudoInst<(outs rGPR:$Rd),
                                 (ins i32imm:$label, nohash_imm:$id, pred:$p),
                                 4, IIC_iALUi,