diff options
author | Luke Lau <luke@igalia.com> | 2025-07-30 11:31:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-30 11:31:04 +0800 |
commit | b663e563cce2bcf6cf7e15799f0ab1cfc56a8361 (patch) | |
tree | d80e1a7ff4c735383900b4dcf7a94810f8d210eb /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 9b23e2bf8d69909d959434da5ef392aefcd0b694 (diff) | |
download | llvm-b663e563cce2bcf6cf7e15799f0ab1cfc56a8361.zip llvm-b663e563cce2bcf6cf7e15799f0ab1cfc56a8361.tar.gz llvm-b663e563cce2bcf6cf7e15799f0ab1cfc56a8361.tar.bz2 |
[VPlan] Fix header masks in EVL tail folding (#150202)
With EVL tail folding, the EVL may not always be VF on the
second-to-last iteration.
Recipes that have been converted to VP intrinsics via optimizeMaskToEVL
account for this, but recipes that are left behind will still use the
old header mask which may end up having a different vector length.
This is effectively the same as #95368, and fixes this by converting
header masks from icmp ule wide-canonical-iv, backedge-trip-count ->
icmp ult step-vector, evl. Without it, recipes that fall through
optimizeMaskToEVL may use the wrong vector length, e.g. in #150074 and
#149981.
We really need to split off optimizeMaskToEVL into
VPlanTransforms::optimize and move transformRecipestoEVLRecipes into
tryToBuildVPlanWithVPRecipes, so we don't mix up what is needed for
correctness and what is needed to optimize away the mask computations.
We should be able to still generate a correct albeit suboptimal VPlan
without running optimizeMaskToEVL. I've added a TODO for this, which I
think we can do after #148274
Fixes #150197
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions