HomePhabricator

[SelectionDAG] When splitting gathers/scatters in type legalization, set MMO…

Authored by craig.topper on Wed, Mar 18, 3:49 PM.

Description

[SelectionDAG] When splitting gathers/scatters in type legalization, set MMO size to UnknownSize

Gather/scatter don't access one memory location, they access multiple disjoint locations. So using a fixed size isn't accurate. But we don't have a way to represent the true behavior so just use UnknownSize.

Previously we "split" the memory VT and use that size for the MMO of each half. But the memory VT is scalar so splitting usually just returned the original scalar VT, but on 32-bit X86 if the scalar VT was i64 it probably returned i32?

Differential Revision: https://reviews.llvm.org/D76388