ARM pop of a single register encodes as post-indexed LDR.
[oota-llvm.git] / test / CodeGen / ARM / str_pre-2.ll
1 ; RUN: llc < %s -mtriple=armv6-linux-gnu -regalloc=linearscan | FileCheck %s
2 ; RUN: llc < %s -mtriple=armv6-linux-gnu -regalloc=basic | FileCheck %s
3
4 ; The greedy register allocator uses a single CSR here, invalidating the test.
5
6 @b = external global i64*
7
8 define i64 @t(i64 %a) nounwind readonly {
9 entry:
10 ; CHECK: str lr, [sp, #-4]!
11 ; CHECK: pop {lr}
12         %0 = load i64** @b, align 4
13         %1 = load i64* %0, align 4
14         %2 = mul i64 %1, %a
15         ret i64 %2
16 }