1 ; RUN: llc -mtriple armv7a--none-eabi < %s -enable-ipra | FileCheck %s
3 ; A linkone_odr function (the same applies to available_externally, linkonce,
4 ; weak, common, extern_weak and weak_odr) could be replaced with a
5 ; differently-compiled version of the same source at link time, which might use
6 ; different registers, so we can't do IPRA on it.
7 define linkonce_odr void @leaf_linkonce_odr() {
11 define void @test_linkonce_odr() {
12 ; CHECK-LABEL: test_linkonce_odr:
15 ; CHECK: mov [[TEMP:r[0-9]+]], r3
16 ; CHECK: bl leaf_linkonce_odr
17 ; CHECK: mov r3, [[TEMP]]
19 %0 = tail call i32 asm sideeffect "// ASM1: $0", "={r3},0"(i32 undef)
20 tail call void @leaf_linkonce_odr()
21 %1 = tail call i32 asm sideeffect "// ASM2: $0", "={r3},0"(i32 %0)
25 ; This function has external linkage (the same applies to private, internal and
26 ; appending), so the version we see here is guaranteed to be the version
27 ; selected by the linker, so we can do IPRA.
28 define external void @leaf_external() {
32 define void @test_external() {
33 ; CHECK-LABEL: test_external:
37 ; CHECK: bl leaf_external
40 %0 = tail call i32 asm sideeffect "// ASM1: $0", "={r3},0"(i32 undef)
41 tail call void @leaf_external()
42 %1 = tail call i32 asm sideeffect "// ASM2: $0", "={r3},0"(i32 %0)