[llvm] [DebugInfo] Accept DW_OP_xderef_size and DW_OP_lit1..DW_OP_lit31. (PR #227839)
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 4 23:16:13 PDT 2026
================
@@ -1932,13 +1932,17 @@ TargetInstrInfo::describeLoadedValue(const MachineInstr &MI,
if (MI.getNumExplicitDefs() != 1)
return std::nullopt;
+ // DW_OP_deref_size needs a known size that fits in its one-byte operand.
+ if (!MMO->getSize().hasValue() || MMO->getSize().isScalable() ||
+ !isUInt<8>(MMO->getSize().getValue().getFixedValue()))
----------------
echristo wrote:
As a quick note, we don't check address size here and probably could just to make sure we don't encode something too large. It's probably a little more boot and suspenders than I normally would do, so I'll approve and if you want to chat about it hit me up after you fix the other one :)
https://github.com/llvm/llvm-project/pull/227839
More information about the llvm-commits
mailing list