Skip to content

Commit c7870cc

Browse files
committedMar 22, 2019
[ARM] [NFC] Use tGPR in patterns where appropriate.
This doesn't have any practical effect at the moment, as far as I know, because high registers aren't allocatable in Thumb1 mode. But it might matter in the future. Differential Revision: https://reviews.llvm.org/D59675 llvm-svn: 356791
1 parent a0aaa11 commit c7870cc

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed
 

‎llvm/lib/Target/ARM/ARMInstrThumb.td

+12-11
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,8 @@ def tLDMIA_UPD :
811811
"$Rn = $wb", IIC_iLoad_mu>,
812812
PseudoInstExpansion<(tLDMIA tGPR:$Rn, pred:$p, reglist:$regs)> {
813813
let Size = 2;
814-
let OutOperandList = (outs GPR:$wb);
815-
let InOperandList = (ins GPR:$Rn, pred:$p, reglist:$regs, variable_ops);
814+
let OutOperandList = (outs tGPR:$wb);
815+
let InOperandList = (ins tGPR:$Rn, pred:$p, reglist:$regs, variable_ops);
816816
let Pattern = [];
817817
let isCodeGenOnly = 1;
818818
let isPseudo = 1;
@@ -821,7 +821,7 @@ def tLDMIA_UPD :
821821

822822
// There is no non-writeback version of STM for Thumb.
823823
let mayStore = 1, hasExtraSrcRegAllocReq = 1 in
824-
def tSTMIA_UPD : Thumb1I<(outs GPR:$wb),
824+
def tSTMIA_UPD : Thumb1I<(outs tGPR:$wb),
825825
(ins tGPR:$Rn, pred:$p, reglist:$regs, variable_ops),
826826
AddrModeNone, 2, IIC_iStore_mu,
827827
"stm${p}\t$Rn!, $regs", "$Rn = $wb", []>,
@@ -1511,12 +1511,13 @@ def tInt_eh_sjlj_setjmp : ThumbXI<(outs),(ins tGPR:$src, tGPR:$val),
15111511
// FIXME: Non-IOS version(s)
15121512
let isBarrier = 1, hasSideEffects = 1, isTerminator = 1, isCodeGenOnly = 1,
15131513
Defs = [ R7, LR, SP ] in
1514-
def tInt_eh_sjlj_longjmp : XI<(outs), (ins GPR:$src, GPR:$scratch),
1514+
def tInt_eh_sjlj_longjmp : XI<(outs), (ins tGPR:$src, tGPR:$scratch),
15151515
AddrModeNone, 0, IndexModeNone,
15161516
Pseudo, NoItinerary, "", "",
1517-
[(ARMeh_sjlj_longjmp GPR:$src, GPR:$scratch)]>,
1517+
[(ARMeh_sjlj_longjmp tGPR:$src, tGPR:$scratch)]>,
15181518
Requires<[IsThumb,IsNotWindows]>;
15191519

1520+
// (Windows is Thumb2-only)
15201521
let isBarrier = 1, hasSideEffects = 1, isTerminator = 1, isCodeGenOnly = 1,
15211522
Defs = [ R11, LR, SP ] in
15221523
def tInt_WIN_eh_sjlj_longjmp
@@ -1611,16 +1612,16 @@ def : T1Pat<(extloadi16 t_addrmode_rr:$addr), (tLDRHr t_addrmode_rr:$addr)>;
16111612
// and expand it just after ISel.
16121613
let usesCustomInserter = 1, mayLoad =1,
16131614
Constraints = "$Rn = $Rn_wb,@earlyclobber $Rn_wb" in
1614-
def tLDR_postidx: tPseudoInst<(outs rGPR:$Rt, rGPR:$Rn_wb),
1615-
(ins rGPR:$Rn, pred:$p),
1615+
def tLDR_postidx: tPseudoInst<(outs tGPR:$Rt, tGPR:$Rn_wb),
1616+
(ins tGPR:$Rn, pred:$p),
16161617
4, IIC_iStore_ru,
16171618
[]>;
16181619

16191620
// post-inc STR -> STM r0!, {r1}. The layout of this (because it doesn't def
16201621
// multiple registers) is the same in ISel as MachineInstr, so there's no need
16211622
// for a pseudo.
1622-
def : T1Pat<(post_store rGPR:$Rt, rGPR:$Rn, 4),
1623-
(tSTMIA_UPD rGPR:$Rn, rGPR:$Rt)>;
1623+
def : T1Pat<(post_store tGPR:$Rt, tGPR:$Rn, 4),
1624+
(tSTMIA_UPD tGPR:$Rn, tGPR:$Rt)>;
16241625

16251626
// If it's impossible to use [r,r] address mode for sextload, select to
16261627
// ldr{b|h} + sxt{b|h} instead.
@@ -1689,9 +1690,9 @@ def : T1Pat<(i32 imm256_510:$src),
16891690
// be expanded into two instructions late to allow if-conversion and
16901691
// scheduling.
16911692
let isReMaterializable = 1 in
1692-
def tLDRpci_pic : PseudoInst<(outs GPR:$dst), (ins i32imm:$addr, pclabel:$cp),
1693+
def tLDRpci_pic : PseudoInst<(outs tGPR:$dst), (ins i32imm:$addr, pclabel:$cp),
16931694
NoItinerary,
1694-
[(set GPR:$dst, (ARMpic_add (load (ARMWrapper tconstpool:$addr)),
1695+
[(set tGPR:$dst, (ARMpic_add (load (ARMWrapper tconstpool:$addr)),
16951696
imm:$cp))]>,
16961697
Requires<[IsThumb, IsThumb1Only]>;
16971698

0 commit comments

Comments
 (0)
Please sign in to comment.