extend folding fsub/fadd to fneg for FMF
authorMichael Berg <michael_c_berg@apple.com>
Thu, 9 Aug 2018 17:00:03 +0000 (17:00 +0000)
committerMichael Berg <michael_c_berg@apple.com>
Thu, 9 Aug 2018 17:00:03 +0000 (17:00 +0000)
commitca38254601ce7b0f9b096d54cf9b4e2ebaa4716b
treec677f0da3704073a2d99597696a11b5e264578a3
parent8c4366273cda0928f218fef6b3030e33b69fb447
extend folding fsub/fadd to fneg for FMF

Summary: This change provides a common optimization path for both Unsafe and FMF driven optimization for this fsub fold adding reassociation, as it the flag that most closely represents the translation

Reviewers: spatel, wristow, arsenm

Reviewed By: spatel

Subscribers: wdng

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

llvm-svn: 339357
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/fp-fold.ll