[PATCH] D77299: [InstCombine] convert bitcast-shuffle to vector trunc
Daan Sprenkels via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 10:17:39 PDT 2020
dsprenkels added a comment.
In the spirit of https://llvm.org/docs/CodeReview.html#non-experts-should-review-code, I am reviewing the code. But I defer the approval of this patch to somebody else who has more experience than me. (I found only a single nit.)
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:1691
+ continue;
+ int LSBIndex = IsBigEndian ? (i + 1) * TruncRatio - 1 : i * TruncRatio;
+ if (Mask[i] != LSBIndex)
----------------
`i * TruncRatio` could in theory overflow for ridiculous types. Maybe consider using `int64_t` for `LSBIndex`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77299/new/
https://reviews.llvm.org/D77299
More information about the llvm-commits
mailing list