summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AArch64/AArch64InstrFormats.td
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2018-08-30 11:55:16 +0000
committerDavid Green <david.green@arm.com>2018-08-30 11:55:16 +0000
commit1f203bcd750408d2df42adebe54ec276d81f5f0d (patch)
tree01c6ebc8e56149a2957062ea841eb35f2a02c570 /llvm/lib/Target/AArch64/AArch64InstrFormats.td
parent38bdac5db854d298013388cd6887f49f56d10ffe (diff)
downloadbcm5719-llvm-1f203bcd750408d2df42adebe54ec276d81f5f0d.tar.gz
bcm5719-llvm-1f203bcd750408d2df42adebe54ec276d81f5f0d.zip
[AArch64] Optimise load(adr address) to ldr address
Providing that the load is known to be 4 byte aligned, we can optimise a ldr(adr address) to just ldr address. Differential Revision: https://reviews.llvm.org/D51030 llvm-svn: 341058
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64InstrFormats.td')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstrFormats.td6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstrFormats.td b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
index 123cddd53ba..4e935bdc1ad 100644
--- a/llvm/lib/Target/AArch64/AArch64InstrFormats.td
+++ b/llvm/lib/Target/AArch64/AArch64InstrFormats.td
@@ -2853,10 +2853,10 @@ def am_ldrlit : Operand<iPTR> {
let OperandType = "OPERAND_PCREL";
}
-let mayLoad = 1, mayStore = 0, hasSideEffects = 0 in
-class LoadLiteral<bits<2> opc, bit V, RegisterOperand regtype, string asm>
+let mayLoad = 1, mayStore = 0, hasSideEffects = 0, AddedComplexity = 20 in
+class LoadLiteral<bits<2> opc, bit V, RegisterOperand regtype, string asm, list<dag> pat>
: I<(outs regtype:$Rt), (ins am_ldrlit:$label),
- asm, "\t$Rt, $label", "", []>,
+ asm, "\t$Rt, $label", "", pat>,
Sched<[WriteLD]> {
bits<5> Rt;
bits<19> label;
OpenPOWER on IntegriCloud