-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Widened pointers not optimized back to scalar for vectorized interleaved accesses on RISC-V #136425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-risc-v Author: Luke Lau (lukel97)
https://compiler-explorer.com/z/bcnocK139
In the loop f, the loop vectorizer is able to use a scalar address throughout the segmented accesses. In g, where not every segmented field is written back to, it's kept around as a widened vector of pointers, even though we only use the first element of it.
|
Would this be fixed if the loop vectorizer emitted strided.store natively instead of masked.scatter? |
I'm not sure. The strided store is already using a scalar pointer, it's the segmented load that carries around the vector pointer |
The scalar pointer for the strided store was created by RISCVGatherScatterLowering wasn't it? Hopefully if the vectorizer was emitting a strided store, it wouldn't make a vector induction variable. |
Oh I see what you mean, that makes sense. I did some poking about and it looks like we never create a widened pointer to begin with in |
https://compiler-explorer.com/z/bcnocK139
In the loop f, the loop vectorizer is able to use a scalar address throughout the segmented accesses.
In g, where not every segmented field is written back to, it's kept around as a widened vector of pointers, even though we only use the first element of it.
legalizeAndOptimizeInductions
in VPlanTransforms.cpp may not be catching this case.The text was updated successfully, but these errors were encountered: