[PATCH] D100121: [LV] Let selectVectorizationFactor reason directly on VectorizationFactor.

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 11:00:07 PDT 2021


bmahjour added a comment.

In D100121#2677358 <https://reviews.llvm.org/D100121#2677358>, @sdesmalen wrote:

> You're right, that comment wasn't correct. I wrote the code last week and incorrectly remembered the change when writing up the comment today.
>
> The issue has to do with the truncation. It stores the floating-point cost in the ProfitableVFs list as `unsigned`.
>
> For llvm/test/Transforms/LoopVectorize/X86/intrinsiccost.ll, it then compares the costs as follows:
>
>   1 < 2 ? true
>   0 < 1 ? true
>   0 < 0 ? false
>
> Where it now compares the costs properly as:
>
>   5/4 < 5/2 ? true
>   5/8 < 5/4 ? true
>   5/16 < 5/8 ? true

I see. That makes sense.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100121



More information about the llvm-commits mailing list