diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-05-19 07:26:50 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-05-19 07:26:50 +0000 |
commit | b7704fee4cdaafbacc9bd90dfb571c41e3e4598c (patch) | |
tree | 34c60eae28be00c070a353a492827d598b23965d | |
parent | 4518c866b4127bbaaa0761c6b43e161386b34355 (diff) | |
download | bcm5719-llvm-b7704fee4cdaafbacc9bd90dfb571c41e3e4598c.tar.gz bcm5719-llvm-b7704fee4cdaafbacc9bd90dfb571c41e3e4598c.zip |
Use 'adr' for LEApcrel and LEApcrel. Mark LEApcrel re-materializable.
llvm-svn: 104114
-rw-r--r-- | llvm/lib/Target/ARM/ARMInstrInfo.td | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/Target/ARM/ARMInstrInfo.td b/llvm/lib/Target/ARM/ARMInstrInfo.td index 58a388520a4..508a1436518 100644 --- a/llvm/lib/Target/ARM/ARMInstrInfo.td +++ b/llvm/lib/Target/ARM/ARMInstrInfo.td @@ -849,23 +849,15 @@ def PICSTRB : AXI2stb<(outs), (ins GPR:$src, addrmodepc:$addr, pred:$p), // LEApcrel - Load a pc-relative address into a register without offending the // assembler. let neverHasSideEffects = 1 in { +let isReMaterializable = 1 in def LEApcrel : AXI1<0x0, (outs GPR:$dst), (ins i32imm:$label, pred:$p), Pseudo, IIC_iALUi, - !strconcat(!strconcat(".set ${:private}PCRELV${:uid}, ($label-(", - "${:private}PCRELL${:uid}+8))\n"), - !strconcat("${:private}PCRELL${:uid}:\n\t", - "add$p\t$dst, pc, #${:private}PCRELV${:uid}")), - []>; + "adr$p\t$dst, #$label", []>; def LEApcrelJT : AXI1<0x0, (outs GPR:$dst), (ins i32imm:$label, nohash_imm:$id, pred:$p), - Pseudo, IIC_iALUi, - !strconcat(!strconcat(".set ${:private}PCRELV${:uid}, " - "(${label}_${id}-(", - "${:private}PCRELL${:uid}+8))\n"), - !strconcat("${:private}PCRELL${:uid}:\n\t", - "add$p\t$dst, pc, #${:private}PCRELV${:uid}")), - []> { + Pseudo, IIC_iALUi, + "adr$p\t$dst, #${label}_${id}", []> { let Inst{25} = 1; } } // neverHasSideEffects |