This is an archive of the discontinued LLVM Phabricator instance.

GlobalISel: Add assert that legalize mutation makes sense
ClosedPublic

Authored by arsenm on Jan 29 2019, 9:02 PM.

Details

Summary

I've repeatedly encountered bugs resulting from custom legalize
mutations returning nonsense legalize results, such as increasing the
number of elements for FewerElements. Add an assert function to make
sure the type to mutate to is consistent with the legalize action.

Diff Detail

Event Timeline

arsenm created this revision.Jan 29 2019, 9:02 PM
paquette accepted this revision.Jan 30 2019, 9:34 AM

This seems like a good idea. LGTM.

This revision is now accepted and ready to land.Jan 30 2019, 9:34 AM
arsenm closed this revision.Jan 30 2019, 9:53 AM

r352636