[x86] add fake scalar FP logic instructions to ReplaceableInstrs to save some bytes
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 Nov 2016 17:42:40 +0000 (17:42 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 Nov 2016 17:42:40 +0000 (17:42 +0000)
commit7f3d51f8403a2a6b7258b5423addb8bc148c11c1
tree0636003018c0bd120f1643bac9f15d9db4baf1e1
parentd47588986e102d022f5cc92fdb2b16b5554830ca
[x86] add fake scalar FP logic instructions to ReplaceableInstrs to save some bytes

We can replace "scalar" FP-bitwise-logic with other forms of bitwise-logic instructions.
Scalar SSE/AVX FP-logic instructions only exist in your imagination and/or the bowels of
compilers, but logically equivalent int, float, and double variants of bitwise-logic
instructions are reality in x86, and the float variant may be a shorter instruction
depending on which flavor (SSE or AVX) of vector ISA you have...so just prefer float all
the time.

This is a preliminary step towards solving PR6137:
https://llvm.org/bugs/show_bug.cgi?id=6137

Differential Revision:
https://reviews.llvm.org/D26712

llvm-svn: 287122
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/fast-isel-select-sse.ll
llvm/test/CodeGen/X86/fp-logic-replace.ll
llvm/test/CodeGen/X86/fp-logic.ll
llvm/test/CodeGen/X86/fp-select-cmp-and.ll
llvm/test/CodeGen/X86/sse-minmax.ll