[llvm] [bolt][aarch64] simplify rodata/literal load for X86 & AArch64 (PR #165723)
YongKang Zhu via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 1 08:51:36 PST 2025
================
@@ -0,0 +1,87 @@
+// this test checks a load literal instructions changed to movk
+
+# REQUIRES: system-linux
+
+# RUN: rm -rf %t && split-file %s %t
+
+# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
+# RUN: --defsym CIBIGFUNC=1 \
+# RUN: %t/materialized-ci.s -o %t/materialized-ci.o
+# RUN: %clang %t/materialized-ci.o -Wl,-q \
+# RUN: -o %t/materialized-ci.exe
+# RUN: llvm-bolt %t/materialized-ci.exe \
+# RUN: -o %t/materialized-ci.bolt --lite=0 \
+# RUN: --keep-nops --eliminate-unreachable=false \
+# RUN: | FileCheck %s --check-prefix=CHECK-LOGS
+
+# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
+# RUN: --defsym CIOUTSIDEFUNC=1 \
+# RUN: %t/materialized-ci.s -o %t/materialized-ci.o
+# RUN: %clang %t/materialized-ci.o -Wl,-q \
+# RUN: -o %t/materialized-ci.exe
+# RUN: llvm-bolt %t/materialized-ci.exe \
+# RUN: -o %t/materialized-ci.bolt --lite=0 \
+# RUN: --keep-nops --eliminate-unreachable=false \
+# RUN: | FileCheck %s --check-prefix=CHECK-LOGS
+
+# CHECK-LOGS: simplified 2 out of 2 loads
+
+#--- materialized-ci.s
----------------
yozhu wrote:
Now that we use `-defsym` and there is only one source file, we don't need to run `split-file`.
https://github.com/llvm/llvm-project/pull/165723
More information about the llvm-commits
mailing list