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

Bing Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 03:19:53 PST 2020


yubing added a comment.

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

> 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?

Besides, do we use the information of MemType after LegalizeType procedure? I found X86InstrFragmentsSIMD.td may use it that info but mgather is handled outside X86DAGToDAGISel::SelectCode.


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