Remove BinaryOperator::CreateFNeg
authorSimon Moll <simon.moll@emea.nec.com>
Thu, 27 Feb 2020 17:05:54 +0000 (09:05 -0800)
committerSimon Moll <simon.moll@emea.nec.com>
Thu, 27 Feb 2020 17:06:03 +0000 (09:06 -0800)
commitddd11273d9d0807e25a34181e5978e3307d78dc2
tree07bc2006f35a12a9ecf635e546396a4f418fc541
parent740ed617f7d4d16e7883636c5eff994f8be7eba4
Remove BinaryOperator::CreateFNeg

Use UnaryOperator::CreateFNeg instead.

Summary:
With the introduction of the native fneg instruction, the
fsub -0.0, %x idiom is obsolete. This patch makes LLVM
emit fneg instead of the idiom in all places.

Reviewed By: cameron.mcinally

Differential Revision: https://reviews.llvm.org/D75130
23 files changed:
clang/test/CodeGen/complex-math.c
llvm/include/llvm/IR/InstrTypes.h
llvm/lib/IR/Instructions.cpp
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/InstCombine/cos-sin-intrinsic.ll
llvm/test/Transforms/InstCombine/fast-math.ll
llvm/test/Transforms/InstCombine/fmul.ll
llvm/test/Transforms/InstCombine/fneg.ll
llvm/test/Transforms/InstCombine/fpcast.ll
llvm/test/Transforms/InstCombine/fsub.ll
llvm/test/Transforms/InstCombine/maximum.ll
llvm/test/Transforms/InstCombine/maxnum.ll
llvm/test/Transforms/InstCombine/minimum.ll
llvm/test/Transforms/InstCombine/minmax-fp.ll
llvm/test/Transforms/InstCombine/minnum.ll
llvm/test/Transforms/InstCombine/pow-1.ll
llvm/test/Transforms/Reassociate/fast-basictest.ll
llvm/test/Transforms/Reassociate/fp-expr.ll