This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Stop performFP_TO_INTCombine from folding with ISD::FRINT.
ClosedPublic

Authored by craig.topper on Aug 9 2023, 11:01 PM.

Details

Summary

FRINT was added to matchRoundingOp after this function was written.
So FRINT was not tested originally.

For vectors, folding this causes us to create a CSR swap that tries
to write 7 to FRM. This is an illegal value and will cause the CSR
write to fail.

While this might be a legal fold we could do, I'm disabling it for
now so we can backport to LLVM 17 with the least risk.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 9 2023, 11:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 11:01 PM
craig.topper requested review of this revision.Aug 9 2023, 11:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 11:01 PM

Add a comment

This revision is now accepted and ready to land.Aug 9 2023, 11:10 PM
asb accepted this revision.Aug 10 2023, 8:04 AM

LGTM.

This revision was landed with ongoing or failed builds.Aug 10 2023, 9:30 AM
This revision was automatically updated to reflect the committed changes.