[llvm] [BOLT] Avoid reference updates for non-JT symbol operands (PR #88838)

Kristof Beyls via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 02:26:16 PDT 2024


================
@@ -0,0 +1,60 @@
+# If the operand references a symbol that differs from the jump table label,
+# no reference updating is required even if its target address resides within
+# the jump table's range.
+# In this test case, consider the second instruction within the main function,
+# where the address resulting from 'c + 17' corresponds to one byte beyond the
+# address of the .LJTI2_0 jump table label. However, this operand represents
+# an offset calculation related to the global variable 'c' and should remain
+# unaffected by the jump table.
+
+# REQUIRES: system-linux
+
+
+# RUN: %clang -no-pie  %s -o %t.exe -Wl,-q
----------------
kbeyls wrote:

This test fails on my AArch64-linux machine.
It seems that something is missing on this clang command line to tell it explicitly to target x86? In some of the other tests in this directory, it seems that might be done indirectly by adding %cflags to the clang command line?

https://github.com/llvm/llvm-project/pull/88838


More information about the llvm-commits mailing list