[PATCH] D11800: [ARM] Reorganise and simplify thumb-1 load/store selection
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 10:15:45 PDT 2015
john.brawn added inline comments.
================
Comment at: lib/Target/ARM/ARMInstrThumb.td:1385
@@ -1374,3 +1384,3 @@
// zextload i1 -> zextload i8
-def : T1Pat<(zextloadi1 t_addrmode_rrs1:$addr),
- (tLDRBr t_addrmode_rrs1:$addr)>;
+def : T1Pat<(zextloadi1 t_addrmode_rr:$addr),
+ (tLDRBr t_addrmode_rr:$addr)>;
----------------
rengolin wrote:
> but this is still "favouring" register offset?
Yes, looks like I missed that one. I'll fix that.
================
Comment at: lib/Target/ARM/ARMInstrThumb.td:1402
@@ -1391,7 +1401,3 @@
// extload -> zextload
-def : T1Pat<(extloadi1 t_addrmode_rrs1:$addr), (tLDRBr t_addrmode_rrs1:$addr)>;
-def : T1Pat<(extloadi1 t_addrmode_is1:$addr), (tLDRBi t_addrmode_is1:$addr)>;
-def : T1Pat<(extloadi8 t_addrmode_rrs1:$addr), (tLDRBr t_addrmode_rrs1:$addr)>;
-def : T1Pat<(extloadi8 t_addrmode_is1:$addr), (tLDRBi t_addrmode_is1:$addr)>;
-def : T1Pat<(extloadi16 t_addrmode_rrs2:$addr), (tLDRHr t_addrmode_rrs2:$addr)>;
-def : T1Pat<(extloadi16 t_addrmode_is2:$addr), (tLDRHi t_addrmode_is2:$addr)>;
+def : T1Pat<(extloadi1 t_addrmode_is1:$addr), (tLDRBi t_addrmode_is1:$addr)>;
+def : T1Pat<(extloadi1 t_addrmode_rr:$addr), (tLDRBr t_addrmode_rr:$addr)>;
----------------
rengolin wrote:
> If I got it right, all of these are just saying: immediate is better than register offset?
Yes. Or rather, try matching an immediate offset before trying matching a register offset.
Repository:
rL LLVM
http://reviews.llvm.org/D11800
More information about the llvm-commits
mailing list