[llvm] [AArch64] Tune unrolling prefs for more patterns on Apple CPUs (PR #149358)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 31 02:20:58 PDT 2025
================
@@ -4821,9 +4822,16 @@ getAppleRuntimeUnrollPreferences(Loop *L, ScalarEvolution &SE,
const SCEV *PtrSCEV = SE.getSCEV(Ptr);
if (SE.isLoopInvariant(PtrSCEV, L))
continue;
- if (isa<LoadInst>(&I))
- LoadedValues.insert(&I);
- else
+ if (isa<LoadInst>(&I)) {
+ LoadedValuesPlus.insert(&I);
+ // Included 1st users of loaded values
+ for (auto *U : I.users()) {
+ auto *Inst = cast<Instruction>(U);
----------------
fhahn wrote:
This should skip uses outside the loop I think
https://github.com/llvm/llvm-project/pull/149358
More information about the llvm-commits
mailing list