This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Mark FREM as Expand
ClosedPublic

Authored by luismarques on Nov 6 2018, 10:09 AM.

Details

Summary

Mark the FREM SelectionDAG node as Expand, which is necessary in order to support the frem IR instruction on RISC-V. This is expanded into a library call. Adds the corresponding test. Previously, this would have triggered an assertion at instruction selection time.

Diff Detail

Event Timeline

luismarques created this revision.Nov 6 2018, 10:09 AM
rogfer01 accepted this revision.Nov 7 2018, 10:35 AM

LGTM.

Thanks Luis. I merged your earlier change D54034 into my downstream compiler just to find that frem was missing (triggered by a downstream test).

The fix I did is exactly this change (modulo the test).

This revision is now accepted and ready to land.Nov 7 2018, 10:35 AM
asb requested changes to this revision.Nov 12 2018, 6:43 AM

Could you please a double-frem.ll test as well?

This revision now requires changes to proceed.Nov 12 2018, 6:43 AM

Adds double-frem.ll test.

This revision was not accepted when it landed; it landed in state Needs Review.Nov 15 2018, 6:48 AM
Closed by commit rL346958: [RISCV] Mark FREM as Expand (authored by asb). · Explain Why
This revision was automatically updated to reflect the committed changes.