[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 06:07:21 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:
Pretty much everywhere in codegen sign extends constants. i.e., MachineOperand's MO_Immediate is int64_t not uint64_t.
https://github.com/llvm/llvm-project/pull/151225
More information about the llvm-commits
mailing list