[PATCH] D140260: [LoopVectorize] Fix crash on "vector->scalar" bitcast vectorization

Mindong Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 19:35:51 PST 2022


mdchen added a comment.

In D140260#4004726 <https://reviews.llvm.org/D140260#4004726>, @lebedev.ri wrote:

> In D140260#4004038 <https://reviews.llvm.org/D140260#4004038>, @mdchen wrote:
>
>> In D140260#4003727 <https://reviews.llvm.org/D140260#4003727>, @lebedev.ri wrote:
>>
>>> It think the loop-invariantness precondition for these is overly restrictive.
>>
>> Any suggestion on that?
>
> For context. loading i64 and loading <8 x i8> and bitcasting to i64 should be the same thing.

Let me try to catch your point, the key difference here is `loading <8 x i8>` cannot appear in a scalar loop and the legality check will ensure that. Thus the vector operand of bitcast must be defined outside the loop.


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

https://reviews.llvm.org/D140260



More information about the llvm-commits mailing list