Skip to content

Commit 94ca9b9

Browse files
committed
Remove update for PPC::MoveGOTtoLR pseudo
1 parent 823ddd4 commit 94ca9b9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,8 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
955955
OutContext),
956956
MCConstantExpr::create(4, OutContext), OutContext);
957957

958-
// Emit 'bcl 20,31,.+4' so the link stack is not corrupted.
959-
EmitToStreamer(*OutStreamer,
960-
MCInstBuilder(PPC::BCLalways).addExpr(OffsExpr));
958+
// Emit the 'bl'.
959+
EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::BL).addExpr(OffsExpr));
961960
return;
962961
}
963962
case PPC::MovePCtoLR:

llvm/test/CodeGen/PowerPC/ppc32-pic.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ entry:
1818
; SMALL-LABEL: foo:
1919
; SMALL: stwu 1, -32(1)
2020
; SMALL: stw 30, 24(1)
21-
; SMALL-BSS: bcl 20, 31, _GLOBAL_OFFSET_TABLE_@local-4
22-
; SMALL-SECURE: bcl 20, 31, .L0$pb
21+
; SMALL-BSS: bl _GLOBAL_OFFSET_TABLE_@local-4
22+
; SMALL-SECURE: bl .L0$pb
2323
; SMALL: mflr 30
2424
; SMALL-SECURE: addis 30, 30, _GLOBAL_OFFSET_TABLE_-.L0$pb@ha
2525
; SMALL-SECURE: addi 30, 30, _GLOBAL_OFFSET_TABLE_-.L0$pb@l

0 commit comments

Comments
 (0)