[llvm] [LoopRotate] Simplify PHINode::removeIncomingValue usage (NFC) (PR #171958)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 11 19:51:16 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-transforms
Author: None (int-zjt)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/171958.diff
1 Files Affected:
- (modified) llvm/lib/Transforms/Utils/LoopRotationUtils.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 0c8d6fa47b9ae..3e11db7dd6e6b 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -100,7 +100,7 @@ static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader,
// Remove PHI node entries that are no longer live.
BasicBlock::iterator I, E = OrigHeader->end();
for (I = OrigHeader->begin(); PHINode *PN = dyn_cast<PHINode>(I); ++I)
- PN->removeIncomingValue(PN->getBasicBlockIndex(OrigPreheader));
+ PN->removeIncomingValue(OrigPreheader);
// Now fix up users of the instructions in OrigHeader, inserting PHI nodes
// as necessary.
``````````
</details>
https://github.com/llvm/llvm-project/pull/171958
More information about the llvm-commits
mailing list