Page MenuHomePhabricator

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

Authored by craig.topper on Wed, Mar 18, 2:47 PM.



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?

Diff Detail

Event Timeline

craig.topper created this revision.Wed, Mar 18, 2:47 PM
efriedma accepted this revision.Wed, Mar 18, 3:23 PM


We could theoretically be more aggressive here, but it's unlikely to matter.

This revision is now accepted and ready to land.Wed, Mar 18, 3:23 PM
RKSimon accepted this revision.Wed, Mar 18, 3:36 PM

Makes sense to me

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptWed, Mar 18, 4:19 PM