[PATCH] D138874: [InstCombine] canonicalize trunc + insert as bitcast + shuffle, part 3

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 7 10:08:45 PST 2022


dmgreen added a comment.

> The good news is that potential regressions like above have been in main for almost a week now, and I haven't seen any bug reports/complaints yet.
> So maybe this kind of IR pattern doesn't happen much in real code where it would be noticed.

I had regressions reported from 2 places from those patches. I was looking into fixing those in the backend using a combine of `splat(bitcast(buildvector` or `splat(bitcast(scalar_to_vector` to `splat` (it was having trouble getting the buildvector legal types correct). Transforming trunc+insert to bitcast+shuffle feels like a bit of a strange canonicalization to me. We can probably fix it up in the backend (and the only regressions I've seen have both been unsimplified splats), but trunc+insert seems simpler.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138874/new/

https://reviews.llvm.org/D138874



More information about the llvm-commits mailing list