[llvm] [TableGen] Set `G_GLOBAL_VALUE` out operand type to `ptype0` (PR #161894)
Alex White via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 3 11:44:22 PDT 2025
https://github.com/MilkeeyCat created https://github.com/llvm/llvm-project/pull/161894
I'm not familiar with how every backend handles this generic opcode but I think it shouldn't break anything and it makes sense to use `ptype0` because `G_GLOBAL_VALUE` returns a pointer.
>From 37192449c0993c6ddfb45b17d89f92991fdc8d22 Mon Sep 17 00:00:00 2001
From: MilkeeyCat <milkeeycat at gmail.com>
Date: Fri, 3 Oct 2025 21:39:44 +0300
Subject: [PATCH] [TableGen] Set `G_GLOBAL_VALUE` out operand type to `ptype0`
---
llvm/include/llvm/Target/GenericOpcodes.td | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Target/GenericOpcodes.td b/llvm/include/llvm/Target/GenericOpcodes.td
index faf77880e4614..e3f995d53484f 100644
--- a/llvm/include/llvm/Target/GenericOpcodes.td
+++ b/llvm/include/llvm/Target/GenericOpcodes.td
@@ -126,7 +126,7 @@ def G_FRAME_INDEX : GenericInstruction {
}
def G_GLOBAL_VALUE : GenericInstruction {
- let OutOperandList = (outs type0:$dst);
+ let OutOperandList = (outs ptype0:$dst);
let InOperandList = (ins unknown:$src);
let hasSideEffects = false;
}
More information about the llvm-commits
mailing list