[PATCH] D132892: [LV] Explicily lower uniform load as single load
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 31 07:18:11 PDT 2022
fhahn added reviewers: Ayal, gilr.
fhahn added a comment.
> This replaces the "scalarize then clone-as-uniform" lowering for loads of uniform values with a dedicated mode of memory widening for this case. This avoids needing to relying on instcombine/GVN to clean up after redundant loads.
IIUC the main issue is that `VPReplicateRecipe::isUniform` means 'uniform-per-part/uniform-per-VF', not 'uniform-across-all-parts'. Unfortunately the terminology is not really used very consistently across different parts of LV. We should be able to catch some cases through improving lowering for uniform VPReplicateRecipes directly: D133019 <https://reviews.llvm.org/D133019>.
If we want to use `isUniformMemOp` to determine the `uniform-across-all-parts` property, I think it would make sense to extend `VPReplicateRecipe` to distinguish between our 2 versions of uniformity. AFAIK `VPWidenXXX` naming scheme is meant to indicate that the recipe will be widened (i.e. a wide vector instruction will be generated), but for uniform loads we only generate a single scalar instruction).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132892/new/
https://reviews.llvm.org/D132892
More information about the llvm-commits
mailing list