[x86] allow FP-logic ops when one operand is FP and result is FP
authorSanjay Patel <spatel@rotateright.com>
Wed, 16 Nov 2016 22:34:05 +0000 (22:34 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 16 Nov 2016 22:34:05 +0000 (22:34 +0000)
commit066139a3ec1ea686e670bfb8afd5637463b65425
tree8c7bccdfabbffb1d6f3b63eba0ae548503cd3116
parentf33f91af245d631034bd55eedc4f9705461d17f6
[x86] allow FP-logic ops when one operand is FP and result is FP

We save an inter-register file move this way. If there's any CPU where
the FP logic is slower, we could transform this back to int-logic in
MachineCombiner.

This helps, but doesn't solve, PR6137:
https://llvm.org/bugs/show_bug.cgi?id=6137

The 'andn' test shows that we're missing a pattern match to
recognize the xor with -1 constant as a 'not' op.

llvm-svn: 287171
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/fp-logic-replace.ll
llvm/test/CodeGen/X86/fp-logic.ll