[PATCH] D112725: [LoopVectorize] Extract the last lane from a uniform store
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 4 05:17:48 PDT 2021
fhahn requested changes to this revision.
fhahn added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:5480
+ // A uniform memory op is itself uniform.
+ if (Legal->isUniformMemOp(I))
addToWorklistIfAllowed(&I);
----------------
Unfortunately this is incorrect now. The worklist currently relies on instructions only demanding the first lane, and this is used to propagate this property later on, using: if all users of an operand demand the first lane only, the operand itself also only needs to compute the first lane. I added a clarifying comment in b4992dbb21ff9159285ae0aec73f3d760344b0e5
Adding stores violates that. You should probably be able to work around that by adding them to `Uniforms` without adding them to the worklist. It might be worth calling out that entries in Uniforms may demand the first or last lane.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D112725/new/
https://reviews.llvm.org/D112725
More information about the llvm-commits
mailing list