OSDN Git Service

AMDGPU: Disable some fneg combines unless nsz
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 19 Jan 2017 06:35:27 +0000 (06:35 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 19 Jan 2017 06:35:27 +0000 (06:35 +0000)
commit261f60f48666aa57e91cfa980ad34e2b77cb2547
tree972b167ca1ef167a99ec8daada78a5e5672461ff
parentcfe56d7c9573ef88b5f685e8dc699553b3bb726e
AMDGPU: Disable some fneg combines unless nsz

For -(x + y) -> (-x) + (-y), if x == -y, this would
change the result from -0.0 to 0.0. Since the fma/fmad
combine is an extension of this problem it also
applies there.

fmul should be fine, and I don't think any of the unary
operators or conversions should be a problem either.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292473 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUISelLowering.cpp
lib/Target/AMDGPU/AMDGPUISelLowering.h
test/CodeGen/AMDGPU/fneg-combines.ll
test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll