This is an archive of the discontinued LLVM Phabricator instance.

[x86] add fake scalar FP logic instructions to ReplaceableInstrs to save some bytes
ClosedPublic

Authored by spatel on Nov 15 2016, 3:48 PM.

Details

Summary

Paraphrasing/plagiarizing the comment in fp-logic-replace.ll:
We can replace "scalar" FP-bitwise-logic with the optimal type instruction. Scalar SSE/AVX FP-logic instructions only exist in your imagination and/or the bowels of compilers, but float and double variants of FP-logic instructions are reality, and the float variant may be a shorter instruction depending on which flavor of vector ISA you have...so just prefer float all the time. Yay, x86!

Diff Detail

Repository
rL LLVM

Event Timeline

spatel updated this revision to Diff 78089.Nov 15 2016, 3:48 PM
spatel retitled this revision from to [x86] add fake scalar FP logic instructions to ReplaceableInstrs to save some bytes.
spatel updated this object.
spatel added reviewers: craig.topper, zvi, RKSimon.
spatel added a subscriber: llvm-commits.
craig.topper accepted this revision.Nov 15 2016, 9:53 PM
craig.topper edited edge metadata.

LGTM

This revision is now accepted and ready to land.Nov 15 2016, 9:53 PM

Thanks, Craig!
For reference, this is part of the yak-shaving needed to fix:
https://llvm.org/bugs/show_bug.cgi?id=6137

This revision was automatically updated to reflect the committed changes.