[llvm] [LV] Adjust the trip count of tail-folded loops which may overflow (PR #224340)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 08:48:13 PDT 2026
================
@@ -1179,6 +1182,21 @@ bool vputils::isDeadRecipe(VPRecipeBase &R) {
R.getVPSingleValue() == R.getParent()->getPlan()->getTripCount())
return false;
+ // Do not remove the canonical IV increment if the canonical IV has any
----------------
david-arm wrote:
This looks like a general bug fix that's independent of this PR and might be worth exploring separately. However, I'm quite surprised that
```
return all_of(R.definedValues(), [](VPValue *V) { return V->user_empty(); });
```
doesn't work, which suggests that the list of users of the increment is incorrect. Either the increment really does have no users (in which case why is it important to avoid deleting?) or it does have users but they aren't recorded in the user list.
https://github.com/llvm/llvm-project/pull/224340
More information about the llvm-commits
mailing list