Skip to content

Commit 02a7800

Browse files
committed
Fix BL definition. BL does not read SP.
1 parent e34a69a commit 02a7800

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2551,7 +2551,7 @@ def ERET : SpecialReturn<0b0100, "eret">;
25512551
// Default to the LR register.
25522552
def : InstAlias<"ret", (RET LR)>;
25532553

2554-
let isCall = 1, Defs = [LR], Uses = [SP] in {
2554+
let isCall = 1, Defs = [LR], isBranch = 1, isIndirectBranch = 1 in {
25552555
def BLR : BranchReg<0b0001, "blr", []>;
25562556
def BLRNoIP : Pseudo<(outs), (ins GPR64noip:$Rn), []>,
25572557
Sched<[WriteBrReg]>,
@@ -2648,7 +2648,7 @@ let isBranch = 1, isTerminator = 1, isBarrier = 1 in {
26482648
def B : BranchImm<0, "b", [(br bb:$addr)]>;
26492649
} // isBranch, isTerminator, isBarrier
26502650

2651-
let isCall = 1, Defs = [LR], Uses = [SP] in {
2651+
let isCall = 1, Defs = [LR], isBranch = 1 in {
26522652
def BL : CallImm<1, "bl", [(AArch64call tglobaladdr:$addr)]>;
26532653
} // isCall
26542654
def : Pat<(AArch64call texternalsym:$func), (BL texternalsym:$func)>;

0 commit comments

Comments
 (0)