llvm-project
848d63cb - [LV] Fix unintended SCEV cache population when querying UnrollVectorizedLoop (#208500)

Commit
10 days ago
[LV] Fix unintended SCEV cache population when querying UnrollVectorizedLoop (#208500) LoopVectorize queried getUnrollingPreferences after VPlan execution, when the vector loop had already been created. If the target hook queries ScalarEvolution, this populates the SCEV caches with expressions for the new loop and changes which existing values SCEVExpander reuses later. This is exposed by #205102, where the new AArch64 unrolling preferences cause unrelated LoopVectorize tests to produce different IR. UnrollVectorizedLoop is a target-wide preference. Query it on the original loop before VPlan execution and before its SCEV information is forgotten. This prevents the preference query from polluting subsequent SCEV expansion.
Author
Parents
Loading