[llvm] [DebugInfo][RemoveDIs] Support maintaining DPValues in CodeGenPrepare (PR #73660)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 29 03:32:58 PST 2023
================
@@ -2234,7 +2239,9 @@ static bool despeculateCountZeros(IntrinsicInst *CountZeros,
// Create another block after the count zero intrinsic. A PHI will be added
// in this block to select the result of the intrinsic or the bit-width
// constant if the input to the intrinsic is zero.
- BasicBlock::iterator SplitPt = ++(BasicBlock::iterator(CountZeros));
+ BasicBlock::iterator SplitPt = std::next(BasicBlock::iterator(CountZeros));
+ // Any debug-info after CountZeros should not be included.
+ SplitPt.setHeadBit(true); // coveredy by Transforms/CodeGenPrepare/X86/cttz-ctlz.ll
----------------
OCHyams wrote:
Did you intend to leave the test coverage comments in? There's are a few others scattered about too.
https://github.com/llvm/llvm-project/pull/73660
More information about the llvm-commits
mailing list