Page MenuHomePhabricator

[SelectionDAGBuilder] Bugfix in visitInlineAsm()
ClosedPublic

Authored by jonpa on Sep 5 2021, 8:46 AM.

Details

Summary

In case of a virtual register tied to a phys-def, the register class needs to be computed. Make sure that this works generally also with fast regalloc by using TLI.getRegClassFor() whenever possible, and make only the case of 'Untyped' use getMinimalPhysRegClass().

Fixes https://bugs.llvm.org/show_bug.cgi?id=51699

Diff Detail

Event Timeline

jonpa created this revision.Sep 5 2021, 8:46 AM
jonpa requested review of this revision.Sep 5 2021, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 5 2021, 8:46 AM
uweigand accepted this revision.Sep 6 2021, 2:59 AM

As you discuss in the bugzilla, this seems a good compromise between using the (larger) RC associated with the type when available, and falling back to the (minimal) RC associated with the physreg if we have a "weird" type. LGTM.

This revision is now accepted and ready to land.Sep 6 2021, 2:59 AM
This revision was automatically updated to reflect the committed changes.