[llvm] [RemoveDIs] Fix SimplifyCFG behaviour to match existing behaviour (PR #82981)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 26 02:54:45 PST 2024
================
@@ -3208,8 +3208,8 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI,
// end of this block.
for (auto &It : make_range(ThenBB->begin(), ThenBB->end()))
for (DbgRecord &DR : make_early_inc_range(It.getDbgValueRange()))
- if (DPValue *DPV = dyn_cast<DPValue>(&DR); DPV && !DPV->isDbgAssign())
- It.dropOneDbgValue(DPV);
+ if (DPValue *DPV = dyn_cast<DPValue>(&DR); !DPV || !DPV->isDbgAssign())
+ It.dropOneDbgValue(&DR);
----------------
jmorse wrote:
Is this condition going to become `!isa<DbgAssign>` in the future-class-refactor? It's worth commenting on what you're filtering for seeing how the current arrangement makes it non-obvious.
https://github.com/llvm/llvm-project/pull/82981
More information about the llvm-commits
mailing list