diff options
author | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2024-10-24 16:25:33 -0400 |
---|---|---|
committer | Hubert Tong <hubert.reinterpretcast@gmail.com> | 2024-10-24 16:25:33 -0400 |
commit | 9420bd58b53824cb6ab30fa4a5cf420ec8b1065c (patch) | |
tree | b3436c2f630fca794f3e6b02e2f28e09a009121c | |
parent | 30d639af8f3708b88919deb978832f28b70fb09f (diff) | |
download | llvm-users/hubert-reinterpretcast/LegacyThinLTO-UseCodeModelFromIR.zip llvm-users/hubert-reinterpretcast/LegacyThinLTO-UseCodeModelFromIR.tar.gz llvm-users/hubert-reinterpretcast/LegacyThinLTO-UseCodeModelFromIR.tar.bz2 |
Legacy ThinLTO LIT tests: codegen using code model from IRusers/hubert-reinterpretcast/LegacyThinLTO-UseCodeModelFromIR
-rw-r--r-- | llvm/test/LTO/PowerPC/codemodel-1.legacy.thinlto.ll | 22 | ||||
-rw-r--r-- | llvm/test/LTO/PowerPC/codemodel-2.legacy.thinlto.ll | 24 |
2 files changed, 46 insertions, 0 deletions
diff --git a/llvm/test/LTO/PowerPC/codemodel-1.legacy.thinlto.ll b/llvm/test/LTO/PowerPC/codemodel-1.legacy.thinlto.ll new file mode 100644 index 0000000..58ccfed --- /dev/null +++ b/llvm/test/LTO/PowerPC/codemodel-1.legacy.thinlto.ll @@ -0,0 +1,22 @@ +; RUN: llvm-as %s -o %t.o +; RUN: llvm-lto --thinlto-action=run %t.o +; RUN: llvm-objdump --disassemble-symbols=._start %t.o.thinlto.o | FileCheck %s --check-prefix=CHECK-SMALL + +target datalayout = "E-m:a-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512" +target triple = "powerpc64-ibm-aix7.2.0.0" + +!llvm.module.flags = !{!0, !1, !2, !3} + +!0 = !{i32 1, !"wchar_size", i32 4} +!1 = !{i32 8, !"PIC Level", i32 2} +!2 = !{i32 1, !"Code Model", i32 1} +!3 = !{i32 1, !"EnableSplitLTOUnit", i32 0} + +@data = internal constant [0 x i32] [] + +define ptr @_start() nounwind readonly { +entry: +; CHECK-SMALL-LABEL: <._start>: +; CHECK-SMALL-NEXT: ld 3, 0(2) + ret ptr @data +} diff --git a/llvm/test/LTO/PowerPC/codemodel-2.legacy.thinlto.ll b/llvm/test/LTO/PowerPC/codemodel-2.legacy.thinlto.ll new file mode 100644 index 0000000..e805503 --- /dev/null +++ b/llvm/test/LTO/PowerPC/codemodel-2.legacy.thinlto.ll @@ -0,0 +1,24 @@ +; RUN: llvm-as %s -o %t.o +; RUN: llvm-lto --thinlto-action=run %t.o +; RUN: llvm-objdump --disassemble-symbols=._start %t.o.thinlto.o | FileCheck %s --check-prefix=CHECK-LARGE + +target datalayout = "E-m:a-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512" +target triple = "powerpc64-ibm-aix7.2.0.0" + +!llvm.module.flags = !{!0, !1, !2, !3} + +!0 = !{i32 1, !"wchar_size", i32 4} +!1 = !{i32 8, !"PIC Level", i32 2} +!2 = !{i32 1, !"Code Model", i32 4} +!3 = !{i32 1, !"EnableSplitLTOUnit", i32 0} + +@data = internal constant [0 x i32] [] + +define ptr @_start() nounwind readonly { +entry: +; CHECK-LARGE-LABEL: <._start>: +; CHECK-LARGE-NEXT: addis 3, 2, 0 +; CHECK-LARGE-NEXT: ld 3, 0(3) + + ret ptr @data +} |