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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 30 07:09:57 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
----------------
arsenm wrote:

I don't think this should be an instruction, or it makes any sense to be one. I assume this is analog with SelectionDAG's TargetGlobalAddress. The point of the distinction is materialized in register or not, so the gisel equivalent would be a use directly in the instruction operand list without a materialized register 

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


More information about the llvm-commits mailing list