[PATCH] D11800: [ARM] Reorganise and simplify thumb-1 load/store selection

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 06:21:31 PDT 2015


rengolin 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)>;
----------------
but this is still "favouring" register offset?

================
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)>;
----------------
If I got it right, all of these are just saying: immediate is better than register offset?


Repository:
  rL LLVM

http://reviews.llvm.org/D11800





More information about the llvm-commits mailing list