[FPEnv] Don't transform FSUB(-0,X)->FNEG(X) in SelectionDAGBuilder.
authorCameron McInally <mcinally@cray.com>
Mon, 3 Aug 2020 15:19:33 +0000 (10:19 -0500)
committerCameron McInally <mcinally@cray.com>
Mon, 3 Aug 2020 15:22:25 +0000 (10:22 -0500)
commit31c7a2fd5c9a5b980768bd06354517d99ac8fe87
tree0742a66c897d9bc3d518c263deb5a88a7cd7b26d
parent10851f9db5f7d163135374b8dfc945e1b4a9c7d6
[FPEnv] Don't transform FSUB(-0,X)->FNEG(X) in SelectionDAGBuilder.

This patch stops unconditionally transforming FSUB(-0,X) into an FNEG(X) while building the DAG. There is also one small change to handle the new FSUB(-0,X) similarly to FNEG(X) in the AMDGPU backend.

Differential Revision: https://reviews.llvm.org/D84056
12 files changed:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
llvm/test/CodeGen/AMDGPU/fcanonicalize-elimination.ll
llvm/test/CodeGen/AMDGPU/fcanonicalize.f16.ll
llvm/test/CodeGen/AMDGPU/fcanonicalize.ll
llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
llvm/test/CodeGen/AMDGPU/fmuladd.f16.ll
llvm/test/CodeGen/AMDGPU/fmuladd.f32.ll
llvm/test/CodeGen/AMDGPU/fneg-combines.ll
llvm/test/CodeGen/AMDGPU/selectcc-opt.ll
llvm/test/CodeGen/AMDGPU/set-dx10.ll