blob: bb1c00ca4ea853b50eb0cb36cd2b70c24a9b876c [file] [log] [blame]
Asaf Badouh89406d12016-04-20 08:32:57 +00001; RUN: llc < %s -O0 -mcpu=generic -mtriple=i686-linux-gnu -relocation-model=pic -enable-pie | FileCheck %s
2; RUN: llc < %s -O0 -mcpu=generic -mtriple=i686-linux-gnu -fast-isel -relocation-model=pic -enable-pie | FileCheck %s
3; RUN: llc < %s -O0 -mcpu=generic -mtriple=x86_64-linux-gnu -relocation-model=pic -enable-pie | FileCheck %s
4; RUN: llc < %s -O0 -mcpu=generic -mtriple=x86_64-linux-gnu -fast-isel -relocation-model=pic -enable-pie | FileCheck %s
5
6; CHECK-LABEL: bar:
7; CHECK: call{{l|q}} foo{{$}}
8; CHECK: call{{l|q}} weak_odr_foo{{$}}
9; CHECK: call{{l|q}} weak_foo{{$}}
10; CHECK: call{{l|q}} internal_foo{{$}}
11; CHECK: call{{l|q}} ext_baz@PLT
12
13define weak void @weak_foo() {
14 ret void
15}
16
17define weak_odr void @weak_odr_foo() {
18 ret void
19}
20
21define internal void @internal_foo() {
22 ret void
23}
24
25declare i32 @ext_baz()
26
27define void @foo() {
28 ret void
29}
30
31define void @bar() {
32entry:
33 call void @foo()
34 call void @weak_odr_foo()
35 call void @weak_foo()
36 call void @internal_foo()
37 call i32 @ext_baz()
38 ret void
39}
40
41; -fpie for local global data tests should be added here