This is an archive of the discontinued LLVM Phabricator instance.

[SDAG] Generate FMINNUM/FMAXNUM/FMINNAN/FMAXNAN from SDAGBuilder
ClosedPublic

Authored by jmolloy on Aug 13 2015, 10:25 AM.

Details

Reviewers
majnemer
hfinkel
Summary

These only get generated if the target supports them. If one of the variants is not legal and the other is, and it is safe to do so, the other variant will be emitted.

For example on AArch32 (V8), we have scalar fminnm but not fmin.

Fix up a couple of tests while we're here - one now produces better code, and the other was just plain wrong to start with.

This is tested by the fact that both ARM and AArch64 mark these nodes as legal.

I know this is basically mechanical, but as it's in the target independent layer I'd appreciate peoples' eyes on it.

Diff Detail

Repository
rL LLVM

Event Timeline

jmolloy updated this revision to Diff 32073.Aug 13 2015, 10:25 AM
jmolloy retitled this revision from to [SDAG] Generate FMINNUM/FMAXNUM/FMINNAN/FMAXNAN from SDAGBuilder.
jmolloy updated this object.
jmolloy added reviewers: majnemer, hfinkel.
jmolloy set the repository for this revision to rL LLVM.
jmolloy added a subscriber: llvm-commits.

LGTM, but I'd still be interested in seeing comments from others that are more familiar with this code.

Hi David,

Do you have any comments on this?

Cheers,

James

hfinkel accepted this revision.Aug 16 2015, 3:56 AM
hfinkel edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 16 2015, 3:56 AM
jmolloy closed this revision.Oct 12 2015, 6:05 AM