[llvm] [LoopVectorize] Teach LoopVectorizationLegality about more early exits (PR #107004)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 05:40:01 PDT 2024
================
@@ -2445,8 +2445,11 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
// vectorize a loop if it contains known function calls that don't set
// the flag. Therefore, it is safe to ignore this read from memory.
auto *Call = dyn_cast<CallInst>(&I);
- if (Call && getVectorIntrinsicIDForCall(Call, TLI))
- continue;
+ if (Call) {
+ NumCalls++;
----------------
paulwalker-arm wrote:
Based on the use, is this too broad? For example, would it prevent loops that call sqrt intrinsics from being vectorisable? What about keeping a count of non-store instructions that can modify memory? This can be added to the code below.
https://github.com/llvm/llvm-project/pull/107004
More information about the llvm-commits
mailing list