[llvm] r177167 - ARM: Fix an old refacto.
Benjamin Kramer
benny.kra at googlemail.com
Fri Mar 15 10:27:40 PDT 2013
Author: d0k
Date: Fri Mar 15 12:27:39 2013
New Revision: 177167
URL: http://llvm.org/viewvc/llvm-project?rev=177167&view=rev
Log:
ARM: Fix an old refacto.
Fixes PR15520.
Modified:
llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
llvm/trunk/test/CodeGen/ARM/call_nolink.ll
Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=177167&r1=177166&r2=177167&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Fri Mar 15 12:27:39 2013
@@ -1357,7 +1357,7 @@ void ARMAsmPrinter::EmitInstruction(cons
OutStreamer.EmitInstruction(MCInstBuilder(ARM::MOVr)
.addReg(ARM::PC)
- .addImm(MI->getOperand(0).getReg())
+ .addReg(MI->getOperand(0).getReg())
// Add predicate operands.
.addImm(ARMCC::AL)
.addReg(0)
Modified: llvm/trunk/test/CodeGen/ARM/call_nolink.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/call_nolink.ll?rev=177167&r1=177166&r2=177167&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/ARM/call_nolink.ll (original)
+++ llvm/trunk/test/CodeGen/ARM/call_nolink.ll Fri Mar 15 12:27:39 2013
@@ -1,5 +1,4 @@
-; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi | \
-; RUN: not grep "bx lr"
+; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi | FileCheck %s
%struct.anon = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* }
@r = external global [14 x i32] ; <[14 x i32]*> [#uses=4]
@@ -8,6 +7,8 @@
@numi = external global i32 ; <i32*> [#uses=1]
@counter = external global [2 x i32] ; <[2 x i32]*> [#uses=1]
+; CHECK: main_bb_2E_i_bb205_2E_i_2E_i_bb115_2E_i_2E_i:
+; CHECK-NOT: bx lr
define void @main_bb_2E_i_bb205_2E_i_2E_i_bb115_2E_i_2E_i() {
newFuncRoot:
@@ -50,3 +51,12 @@ bb115.i.i: ; preds = %bb115.i.i.bb115.i
icmp slt i32 %tmp166.i.i, %tmp168.i.i ; <i1>:0 [#uses=1]
br i1 %0, label %bb115.i.i.bb115.i.i_crit_edge, label %bb115.i.i.bb170.i.i_crit_edge.exitStub
}
+
+define void @PR15520(void ()* %fn) {
+ call void %fn()
+ ret void
+
+; CHECK: PR15520:
+; CHECK: mov lr, pc
+; CHECK: mov pc, r0
+}
More information about the llvm-commits
mailing list