[PATCH] D76983: [InstCombine] Transform extractelement-trunc -> bitcast-extractelement
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 14:05:08 PDT 2020
spatel added a comment.
In D76983#1955540 <https://reviews.llvm.org/D76983#1955540>, @lebedev.ri wrote:
> > Ie, is there consensus that forming a size-changing vector cast from a shuffle is canonical?
>
> I would have guessed it is, yes.
Agree - the trunc is better for analysis, and a quick check of various backends says we do worse at codegen of the shuffle than the trunc, so that's more likely to be the expected form.
And not sure if it counts for anything, but the trunc is the more human-readable form (vs. translating shuffle indexes that depend on endian).
I'll draft a patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76983/new/
https://reviews.llvm.org/D76983
More information about the llvm-commits
mailing list