[PATCH] D93610: [LegalizeType] When LegalizeType procedure widens a masked_gather, set MemoryType equal to ResultType

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 20 23:38:56 PST 2020


craig.topper added a comment.

In D93610#2465300 <https://reviews.llvm.org/D93610#2465300>, @yubing wrote:

> In D93610#2465295 <https://reviews.llvm.org/D93610#2465295>, @craig.topper wrote:
>
>> Fix WidenVecOp_MSCATTER as well?
>>
>> May should just take the element type from the original memory VT and the element count from result? Other targets have extending gathers I think which I think would have different element sizes between result and memory?
>
> Yeah, Besides If OpNo == 4 in WidenVecOp_MSCATTER, I guess we shouldn't widen MemType since we only widen the index?

I think we should keep the same number of elements in the memory VT as the operands so I think it should be widened.

I'm starting to wonder if the real mistake was making memory VT a vector for gather/scatter. Maybe it should have just been a scalar for the element type?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93610



More information about the llvm-commits mailing list