[llvm] [llvm][DebugInfo] Emit 0/1 for constant boolean values (PR #151225)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 10 01:11:08 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:

But how is this easier than just fixing up whatever emits the final object file / asm printing? 

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


More information about the llvm-commits mailing list