[all-commits] [llvm/llvm-project] cb5190: [VPlan] Only skip expansion for SCEVUnknown if it ...
Florian Hahn via All-commits
all-commits at lists.llvm.org
Tue Feb 11 14:26:57 PST 2025
Branch: refs/heads/release/20.x
Home: https://github.com/llvm/llvm-project
Commit: cb51906de1e394b458e3ed9dd06cd9a0b732eb68
https://github.com/llvm/llvm-project/commit/cb51906de1e394b458e3ed9dd06cd9a0b732eb68
Author: Florian Hahn <flo at fhahn.com>
Date: 2025-02-11 (Tue, 11 Feb 2025)
Changed paths:
M llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
M llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
M llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
A llvm/test/Transforms/LoopVectorize/X86/scev-checks-unprofitable.ll
M llvm/test/Transforms/LoopVectorize/float-induction.ll
Log Message:
-----------
[VPlan] Only skip expansion for SCEVUnknown if it isn't an instruction. (#125235)
Update getOrCreateVPValueForSCEVExpr to only skip expansion of
SCEVUnknown if the underlying value isn't an instruction. Instructions
may be defined in a loop and using them without expansion may break
LCSSA form. SCEVExpander will take care of preserving LCSSA if needed.
We could also try to pass LoopInfo, but there are some users of the
function where it won't be available and main benefit from skipping
expansion is slightly more concise VPlans.
Note that SCEVExpander is now used to expand SCEVUnknown with floats.
Adjust the check in expandCodeFor to only check the types and casts if
the type of the value is different to the requested type. Otherwise we
crash when trying to expand a float and requesting a float type.
Fixes https://github.com/llvm/llvm-project/issues/121518.
PR: https://github.com/llvm/llvm-project/pull/125235
(cherry picked from commit e258bca9505f35e0a22cb213a305eea9b76d11ea)
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