[PATCH] D122594: [ArgPromotion] Update min-legal-vector-width when do promotion

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 00:23:01 PDT 2022


pengfei added a comment.

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

> In D122594#3413976 <https://reviews.llvm.org/D122594#3413976>, @pengfei wrote:
>
>> In D122594#3411792 <https://reviews.llvm.org/D122594#3411792>, @craig.topper wrote:
>>
>>> Isn't X86TTIImpl::areTypesABICompatible supposed to be preventing promotion when it was cause a mismatch?
>>
>> It doesn't work in complicated situations, e.g.: https://godbolt.org/z/386n6ErcY
>> On the other hand, I think it makes sense to always update `min-legal-vector-width` to the largest vector width.
>
> That test case needs a triple and -mcpu that has avx512vl and prefer-vector-width=256. There's no ABI mismatch otherwise https://godbolt.org/z/h3vd3TvsW

Thanks Craig. I didn't notice it. It still fails if we switch the order of `-inline` and `-argpromotion`. https://godbolt.org/z/zo3hba8xW


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122594



More information about the llvm-commits mailing list