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

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 22 01:50:11 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());
----------------
Michael137 wrote:

There's a discussion on this in https://github.com/llvm/llvm-project/pull/151225#discussion_r2285414028

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


More information about the llvm-commits mailing list