[llvm] [llvm][DebugInfo] Emit 0/1 for constant boolean values (PR #151225)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 22 02:12:09 PDT 2025
================
@@ -733,6 +733,8 @@ MachineOperand GetMOForConstDbgOp(const SDDbgOperand &Op) {
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
if (CI->getBitWidth() > 64)
return MachineOperand::CreateCImm(CI);
+ if (CI->getBitWidth() == 1)
+ return MachineOperand::CreateImm(CI->getZExtValue());
----------------
arsenm wrote:
TLDR; this should not be special cased. CodeGen imm bool fields are firmly -1
https://github.com/llvm/llvm-project/pull/151225
More information about the llvm-commits
mailing list