[llvm] fd95803 - [LoopRotate] Simplify PHINode::removeIncomingValue usage (NFC) (#171958)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 13 17:43:56 PST 2025
Author: int-zjt
Date: 2025-12-14T09:43:52+08:00
New Revision: fd95803a35655206200783bf81cc84efaaaea939
URL: https://github.com/llvm/llvm-project/commit/fd95803a35655206200783bf81cc84efaaaea939
DIFF: https://github.com/llvm/llvm-project/commit/fd95803a35655206200783bf81cc84efaaaea939.diff
LOG: [LoopRotate] Simplify PHINode::removeIncomingValue usage (NFC) (#171958)
Added:
Modified:
llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
Removed:
################################################################################
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.
More information about the llvm-commits
mailing list