[PATCH] D137341: [VectorCombine] widen a load with subvector insert

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 10:54:19 PST 2022


spatel added a comment.

In D137341#3912990 <https://reviews.llvm.org/D137341#3912990>, @arsenm wrote:

> However, why does the vector combiner need to look at the underlying pointer for the alignment? Doesn't instcombine increase the alignment based on the underlying pointer already, such that this can just read the alignment direct from the instruction?

It's correct that InstCombine improves alignment like that, but it's similar reasoning to why we handled a non-canonical shuffle mask in this patch: vector-combine isn't guaranteed to see canonical code. Currently, it's sitting directly after SLP in the normal opt pipelines, and there's a good chance that SLP has created non-canonical code. We could adjust the opt pipeline to avoid that, but then we increase compile-time, so there's no easy answer AFAIK.


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

https://reviews.llvm.org/D137341



More information about the llvm-commits mailing list