This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal
ClosedPublic

Authored by edward-jones on Sep 12 2016, 9:03 AM.

Diff Detail

Event Timeline

edward-jones retitled this revision from to [SelectionDAGBuilder] Support llvm.flt.rounds on targets where i32 is not legal.
edward-jones updated this object.
edward-jones added a reviewer: bogner.
edward-jones added a subscriber: llvm-commits.
hfinkel added a subscriber: hfinkel.Oct 3 2016, 8:38 AM

Why don't we create it with i32 during SDAG building and then legalize the type later during type legalization (i.e. add handling in DAGTypeLegalizer::ExpandIntegerResult)?

edward-jones updated this object.

hfinkel, Yes I guess that's probably a better approach. I've updated the patch to add ExpandIntRes_FLT_ROUNDS to do this.

hfinkel accepted this revision.Oct 5 2016, 8:27 AM
hfinkel added a reviewer: hfinkel.

LGTM.

lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
2029

Please add a comment here that you're sign-extending the high part because the value might be -1.

This revision is now accepted and ready to land.Oct 5 2016, 8:27 AM
edward-jones edited edge metadata.

Added a comment, and re-add the msp430 test from the first patch.

If this is acceptable, is it okay for someone to commit this on my behalf.

hfinkel closed this revision.Oct 10 2016, 2:33 PM

r283797.