This is an archive of the discontinued LLVM Phabricator instance.

[LegalizeDAG] Add asserts to verify the types of custom legalized operation matches the original node.
ClosedPublic

Authored by craig.topper on Mar 19 2021, 12:12 PM.

Details

Summary

We've messed this up a few times recently on RISCV. Experiments
with these asserts found a couple issues on other targets as well.
They've all been cleaned up now so we can put in these asserts to
catch future issues

I had to waive Glue because ADDC/ADDE/etc legalization replaces
Glue with i32 on at least AArch64. X86 used to do the same before
we switched to ADDCARRY. So I guess that's just how that works.

Diff Detail

Event Timeline

craig.topper created this revision.Mar 19 2021, 12:12 PM
craig.topper requested review of this revision.Mar 19 2021, 12:12 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 12:12 PM
RKSimon accepted this revision.Mar 22 2021, 7:56 AM

LGTM - no objections - maybe add comments explaining why MVT::Glue is special cased?

This revision is now accepted and ready to land.Mar 22 2021, 7:56 AM
This revision was landed with ongoing or failed builds.Mar 22 2021, 10:31 AM
This revision was automatically updated to reflect the committed changes.