OSDN Git Service

[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)
commit09b0be25dc15d7a1a16f5801693f2da98f31491b
tree908b720d25bf906502eeed251948b41e3b6157e5
parent10adab0d54dca2f6e66f8c517ee4fa5dbd354d4c
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287171 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/fp-logic-replace.ll
test/CodeGen/X86/fp-logic.ll