[llvm] [LV] Add initial legality checks for ee loops with stores (PR #145663)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 07:12:54 PDT 2025
================
@@ -407,6 +407,14 @@ class LoopVectorizationLegality {
return hasUncountableEarlyExit() ? getUncountableEdge()->second : nullptr;
}
+ /// Returns true if this is an early exit loop containing a store.
+ bool isConditionCopyRequired() const { return EarlyExitLoad.has_value(); }
----------------
david-arm wrote:
I think this looks odd, i.e. the comment says `Returns true if this is an early exit loop containing a store.` but the code says `return EarlyExitLoad.has_value()`. I expect others reading this code will be confused as well. Can you add more comments explaining why it's using an early exit load to decide if the loop contains a store? Or is just that the comment itself is misleading?
https://github.com/llvm/llvm-project/pull/145663
More information about the llvm-commits
mailing list