This is an archive of the discontinued LLVM Phabricator instance.

[PPC, FastISel] Fix ordered/unordered fcmp
ClosedPublic

Authored by timshen on Mar 17 2016, 10:38 AM.

Details

Reviewers
kbarton
hfinkel
Summary

Ordered comparison oge, ole and one cannot be implemented using a single instruction.

Diff Detail

Event Timeline

timshen updated this revision to Diff 50952.Mar 17 2016, 10:38 AM
timshen retitled this revision from to [PPC, FastISel] Fix ordered/unordered fcmp.
timshen updated this object.
timshen added a reviewer: kbarton.
timshen added subscribers: echristo, hfinkel, llvm-commits.
timshen updated this revision to Diff 50957.Mar 17 2016, 10:39 AM

Updated comments.

hfinkel accepted this revision.Mar 17 2016, 11:00 AM
hfinkel added a reviewer: hfinkel.

I few comments on the comments, but otherwise, LGTM.

lib/Target/PowerPC/PPCFastISel.cpp
220

This wording is somewhat misleading. The 'bc' instruction only looks at one bit, but that bit selected via an b{pred} mnemonic is certainly never the 'un' bit. How about:

However, bc instruction only inspect the first 3 -> However, bc instruction only inspects one of the first 3 bits

221

to undesired -> to an undesired [note also spelling fix]

231

Remove "unexpectedly". [I understand why you say that, but the fact that the bits default to zero is not necessarily surprising, and I think you might confuse the reader of the comment by implying this is more subtle than it is]

This revision is now accepted and ready to land.Mar 17 2016, 11:00 AM
timshen updated this revision to Diff 50962.Mar 17 2016, 11:12 AM
timshen marked 3 inline comments as done.
timshen edited edge metadata.

Updated. Thanks!

timshen closed this revision.Mar 17 2016, 4:14 PM