blob: 95da5f060d721c3a8aceb99b2487a751eecb9b1a [file] [log] [blame]
Matthias Braund2fc0d42016-10-03 21:58:20 +00001; RUN: llc -mtriple=hexagon-- -mcpu=hexagonv5 -relocation-model=pic < %s | FileCheck %s
Krzysztof Parzyszek21dc8bd2015-12-18 20:19:30 +00002
Krzysztof Parzyszeka72fad92017-02-10 15:33:13 +00003; CHECK-DAG: r{{[0-9]+}} = add({{pc|PC}},##_GLOBAL_OFFSET_TABLE_@PCREL)
4; CHECK-DAG: r{{[0-9]+}} = add({{pc|PC}},##x@PCREL)
5; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}+##bar@GOT)
Krzysztof Parzyszek21dc8bd2015-12-18 20:19:30 +00006
7@x = internal global i32 9, align 4
8@bar = external global i32*
9
10define i32 @foo(i32 %y) nounwind {
11entry:
12 store i32* @x, i32** @bar, align 4, !tbaa !0
13 %0 = load i32, i32* @x, align 4, !tbaa !3
14 %add = add nsw i32 %0, %y
15 ret i32 %add
16}
17
18!0 = !{!"any pointer", !1}
19!1 = !{!"omnipotent char", !2}
20!2 = !{!"Simple C/C++ TBAA"}
21!3 = !{!"int", !1}