This is an archive of the discontinued LLVM Phabricator instance.

[Mips] Implement hasDivRemOp()
ClosedPublic

Authored by Jim on May 4 2022, 10:44 PM.

Details

Summary

SDIVREM and UDIVREM can be customized lowered in MipsSE.

Fix https://github.com/llvm/llvm-project/issues/54991.

Diff Detail

Event Timeline

Jim created this revision.May 4 2022, 10:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:44 PM
Jim requested review of this revision.May 4 2022, 10:44 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 4 2022, 10:44 PM
Jim removed a subscriber: llvm-commits.
Jim added a subscriber: llvm-commits.

It matches what we've done on X86 but I don't know if there's any reason MIPS has never added TTI support before? @sdardis might know the background.

sdardis accepted this revision.May 15 2022, 1:22 PM

Nit: the summary should have the line--"This resolves PR/54991" to aid in bug tracking.

LGTM.

For the background on MIPS lacking TTI information, other support was more important at the time, though it was on my todo list.

Let me know if you need someone to commit this on your behalf.

Thanks for the report & patch!

llvm/lib/Target/Mips/CMakeLists.txt
67

Nit: This line should be after the MipsTargetObjectFile.cpp to attempt to keep the alphabetical ordering of the entries in this stanza.

This revision is now accepted and ready to land.May 15 2022, 1:22 PM
Jim edited the summary of this revision. (Show Details)May 15 2022, 7:16 PM
Jim updated this revision to Diff 429594.May 15 2022, 7:24 PM

Keep alphabetical ordering in CMakeLists.txt

Jim marked an inline comment as done.May 15 2022, 7:25 PM
This revision was landed with ongoing or failed builds.May 15 2022, 11:42 PM
This revision was automatically updated to reflect the committed changes.