diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:46:15 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:46:15 +0000 |
| commit | dd58ef019b700900793a1eb48b52123db01b654e (patch) | |
| tree | fcfbb4df56a744f4ddc6122c50521dd3f1c5e196 /test/CodeGen/Hexagon/pic-simple.ll | |
| parent | 2fe5752e3a7c345cdb59e869278d36af33c13fa4 (diff) | |
Notes
Diffstat (limited to 'test/CodeGen/Hexagon/pic-simple.ll')
| -rw-r--r-- | test/CodeGen/Hexagon/pic-simple.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/Hexagon/pic-simple.ll b/test/CodeGen/Hexagon/pic-simple.ll new file mode 100644 index 0000000000000..fa223d5372e17 --- /dev/null +++ b/test/CodeGen/Hexagon/pic-simple.ll @@ -0,0 +1,22 @@ +; RUN: llc -march=hexagon -mcpu=hexagonv5 -relocation-model=pic < %s | FileCheck %s + +; CHECK: r{{[0-9]+}} = add({{pc|PC}}, ##_GLOBAL_OFFSET_TABLE_@PCREL) +; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}{{.*}}+{{.*}}##src@GOT) +; CHECK: r{{[0-9]+}} = memw(r{{[0-9]+}}{{.*}}+{{.*}}##dst@GOT) + +@dst = external global i32 +@src = external global i32 + +define i32 @foo() nounwind { +entry: + %0 = load i32, i32* @src, align 4, !tbaa !0 + store i32 %0, i32* @dst, align 4, !tbaa !0 + %call = tail call i32 @baz(i32 %0) nounwind + ret i32 0 +} + +declare i32 @baz(i32) + +!0 = !{!"int", !1} +!1 = !{!"omnipotent char", !2} +!2 = !{!"Simple C/C++ TBAA"} |
