[PATCH] D139627: clang/X86: Don't emit "min-legal-vector-width"="0"

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 15:48:57 PST 2022


arsenm added a comment.

In D139627#3993471 <https://reviews.llvm.org/D139627#3993471>, @craig.topper wrote:

> If the caller or callee calculate have different values and one of them is less than the width of the vector argument it will cause an ABI break. The type legalizer in SelectionDAG will split one and not the other. Maybe the backend should check the IR for the arguments/returns and increase the min-legal-vector-width if its less than argument width and the argument width is supported by the AVX level.

Right, I think the backend needs to fixup whatever it needs for hard requirements. The current implementation treating it like hard ABI any time a function signature changes isn't scalable. Every possible transform that could introduce a call site would need to handle this.


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

https://reviews.llvm.org/D139627



More information about the llvm-commits mailing list