This is an archive of the discontinued LLVM Phabricator instance.

[GlobalISel] support widen unmerge if WideTy > SrcTy
ClosedPublic

Authored by gargaroff on Mar 20 2020, 6:56 AM.

Details

Summary

Widening G_UNMERGE_VALUES to a type which is larger than the
original source type is the same as widening it to the same
type as the source type: in both cases, G_UNMERGE_VALUES has
to be replaced with bit arithmetic which. Although the arithmetic
itself is independent of whether the source type is smaller
or equal to the widen type, widening the source type to the
widen type should result in less artifacts being emitted,
since this is the type that the user explicitly requested.

Diff Detail

Event Timeline

gargaroff created this revision.Mar 20 2020, 6:56 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 20 2020, 6:56 AM

I'm not sure why this case was unsupported so far, when it looks to be really trivial. Please let me know if I'm not seeing some larger implications with this!

arsenm accepted this revision.Mar 20 2020, 9:19 AM
This revision is now accepted and ready to land.Mar 20 2020, 9:19 AM
dsanders accepted this revision.Mar 20 2020, 11:44 AM

LGTM. I expect that it's just that we didn't encounter it or think it could occur

This revision was automatically updated to reflect the committed changes.