[X86] isNegatibleForFree - allow pre-legalized FMA negation
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 7 Feb 2020 16:38:24 +0000 (16:38 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 7 Feb 2020 17:04:17 +0000 (17:04 +0000)
commitc96001035d4b7ac1b4b84705c7035d6c0fa28ffa
tree225e840a7d14e1ad8866357fad1f725edb030f70
parent28d22c2c9c3199c60ba8ff0a06d06a6ff70b609d
[X86] isNegatibleForFree - allow pre-legalized FMA negation

As long as the FMA operation is legal (which we can proxy for the FMA3/FMA4 variants as well), we don't have to wait for the LegalOperations stage.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/fma-fneg-combine-2.ll
llvm/test/CodeGen/X86/fma_patterns.ll
llvm/test/CodeGen/X86/fma_patterns_wide.ll
llvm/test/CodeGen/X86/recip-fastmath.ll
llvm/test/CodeGen/X86/recip-fastmath2.ll