[PATCH] D73555: [SVE] Fix bug in simplification of scalable vector instructions
Christopher Tetreault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 14:17:40 PST 2020
ctetreau marked an inline comment as done.
ctetreau added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4463
+
+ if (!Scalable) {
+ // Canonicalization: If mask does not select elements from an input vector,
----------------
ctetreau wrote:
> efriedma wrote:
> > Redundant "if"?
> The inner computation walks the indices array, so we do need to test it. I suppose I could have put the !Scalable check inside the match conditional, but I don't think that'd be any clearer. I guess it'd make the diff smaller?
Actually, I mistakenly thought we were discussing the conditional at 4502. I believe that this is not redundant; this will walk from 0 .. MaskEltCount.Min, and will call operator[](i) on Indices, which (assuming SmallVector behaves like std::vector) will result in an out of bounds array access.
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