[llvm] [X86][GlobalISel] Support globals in pic mode (PR #170038)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 1 10:53:36 PST 2025


================
@@ -60,6 +60,16 @@ The address of a global value.
 
   %0(p0) = G_GLOBAL_VALUE @var_local
 
+G_TARGET_GLOBAL_VALUE
+^^^^^^^^^^^^^^^^^^^^^
+
+Like G_GLOBAL_VALUE, but GlobalISel does no folding or anything else with this
----------------
e-kud wrote:

Do you mean to create a `G_LOAD` with GV as a pointer? I haven't tried it, is it supposed to work?

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


More information about the llvm-commits mailing list