[all-commits] [llvm/llvm-project] df9ba1: [LV] Handle scalable VFs in optimizeForVFAndUF (#8...
Philip Reames via All-commits
all-commits at lists.llvm.org
Mon Mar 4 13:49:47 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: df9ba13579e298fcb57aa59c5c187ce6729881d6
https://github.com/llvm/llvm-project/commit/df9ba13579e298fcb57aa59c5c187ce6729881d6
Author: Philip Reames <preames at rivosinc.com>
Date: 2024-03-04 (Mon, 04 Mar 2024)
Changed paths:
M llvm/include/llvm/Analysis/ScalarEvolution.h
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
Log Message:
-----------
[LV] Handle scalable VFs in optimizeForVFAndUF (#82669)
Given a scalable VF of the form <NumElts * VScale>, this patch adds the
ability to discharge a backedge test for a loop whose trip count is
between (NumElts, MinVScale*NumElts).
A couple of notes on this:
* Annoyingly, I could not figure out to write a test for this case. My
attempt is checked in as test32_i8 in f67ef1a, but LV uses a fixed
vector in that case, and ignored the force flags.
* This depends on 9eb5f94f to avoid appearing like a regression. Since
SCEV doesn't know any upper bound on vscale without the vscale_range
attribute (it doesn't query TTI), the ranges overflow on the multiply.
Arguably, this is fixing a bug in the current LV code since in theory
vscale can be large enough to overflow for real, but no actual target is
going to see that case.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list