This is an archive of the discontinued LLVM Phabricator instance.

[MIPS] Address instruction selection failure for abs.[sd]
ClosedPublic

Authored by sdardis on Apr 28 2022, 5:39 PM.

Details

Summary

Previously, the choice between the instruction selection of ISD::FABS was
decided at the point of setting the MIPS target lowering operation choice
either Custom lowering or Legal. This lead to instruction selection
failures as functions could be marked as having no NaNs.

Changing the lowering to always be Custom and directly handling the
the cases where MIPS selects the instructions for ISD::FABS resolves
this crash.

Thanks to kray for reporting the issue and to Simon Atanasyan for producing
the reduced test case.

This resolves PR/53772.

Diff Detail

Event Timeline

sdardis created this revision.Apr 28 2022, 5:39 PM
sdardis requested review of this revision.Apr 28 2022, 5:39 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2022, 5:39 PM
This revision is now accepted and ready to land.Apr 28 2022, 10:11 PM

It looks like this resolves PR/53722 not 53772.

djtodoro accepted this revision.Apr 29 2022, 12:34 AM

Thanks!

This revision was landed with ongoing or failed builds.Apr 29 2022, 3:28 PM
This revision was automatically updated to reflect the committed changes.

Thanks for the review, I've updated the bug number in the commit message.