[llvm] [LoopIdiom] Update strlen idiom body loop condition to be clean up by LoopDeletion (PR #134906)
Henry Jiang via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 9 16:58:02 PDT 2025
================
@@ -1804,6 +1808,11 @@ bool LoopIdiomRecognize::recognizeAndInsertStrLen() {
// up by later passes
for (PHINode *PN : Cleanup)
RecursivelyDeleteDeadPHINode(PN);
+
+ ConstantInt *NewLoopCond = LoopTerm->getSuccessor(0) == LoopBody
----------------
mustartt wrote:
Thanks for taking a look. I added the asserts and comments.
I will take a look to see if there's any further testing required.
https://github.com/llvm/llvm-project/pull/134906
More information about the llvm-commits
mailing list