[PATCH] D73555: [SVE] Fix bug in simplification of scalable vector instructions
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 3 13:24:11 PST 2020
RKSimon added inline comments.
================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:169
APInt &DemandedLHS, APInt &DemandedRHS) {
+ // The length of scalable vectors is unknown at compile time, thus we
+ // cannot check their values
----------------
ctetreau wrote:
> RKSimon wrote:
> > ctetreau wrote:
> > > @RKSimon This is the new code added. It modifies your recent patch, so I figured you'd like to review it.
> > Would it be viable to set all DemandedLHS/DemandedRHS instead so we can still handle all element cases?
> The problem is that for scalable vectors, we don't know how many elements there are. For a scalable vector, getVectorNumElements() returns the minimum number of elements there can be. If we have <vscale x 4 x i32>, it will return 4, which is the number of elements that would be in the vector if vscale = 1. But the value of vscale isn't known until runtime, so this doesn't really help us.
OK, it's a shame we can't do anything in this case. No more comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73555/new/
https://reviews.llvm.org/D73555
More information about the llvm-commits
mailing list