This is an archive of the discontinued LLVM Phabricator instance.

[X86][SSE] Float comparisons can sometimes be safely commuted
ClosedPublic

Authored by RKSimon on Jan 26 2015, 7:31 AM.

Details

Summary

For ordered, unordered, equal and not-equal tests, packed float and double comparison instructions can be safely commuted without affecting the results. This patch checks the comparison mode of the (v)cmpps + (v)cmppd instructions and commutes the result if it can.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon updated this revision to Diff 18758.Jan 26 2015, 7:31 AM
RKSimon retitled this revision from to [X86][SSE] Float comparisons can sometimes be safely commuted.
RKSimon updated this object.
RKSimon edited the test plan for this revision. (Show Details)
RKSimon added reviewers: qcolombet, spatel, mkuper.
RKSimon set the repository for this revision to rL LLVM.
RKSimon added a subscriber: Unknown Object (MLST).
qcolombet accepted this revision.Jan 26 2015, 11:45 AM
qcolombet edited edge metadata.

Hi Simon,

LGTM.

Thanks,
-Quentin

This revision is now accepted and ready to land.Jan 26 2015, 11:45 AM
This revision was automatically updated to reflect the committed changes.