pr6652: Use LDM to restore PC to the return address on ARMv4.
[oota-llvm.git] / test / CodeGen / ARM / 2010-03-18-ldm-rtrn.ll
1 ; RUN: llc < %s -mtriple=armv4-unknown-eabi | FileCheck %s
2 ; RUN: llc < %s -mtriple=armv5-unknown-eabi | FileCheck %s
3 ; RUN: llc < %s -mtriple=armv6-unknown-eabi | FileCheck %s
4
5 define i32 @bar(i32 %a) nounwind {
6 entry:
7   %0 = tail call i32 @foo(i32 %a) nounwind ; <i32> [#uses=1]
8   %1 = add nsw i32 %0, 3                          ; <i32> [#uses=1]
9 ; CHECK: ldmia  sp!, {r11, pc}
10   ret i32 %1
11 }
12
13 declare i32 @foo(i32)