[PATCH] D28885: AMDGPU: Disable some fneg combines unless nsz

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 18:21:24 PST 2017


arsenm created this revision.
Herald added a reviewer: tstellarAMD.
Herald added subscribers: tony-tye, yaxunl, nhaehnle, wdng, kzhuravl.

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.


https://reviews.llvm.org/D28885

Files:
  lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  lib/Target/AMDGPU/AMDGPUISelLowering.h
  test/CodeGen/AMDGPU/fneg-combines.ll
  test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28885.84918.patch
Type: text/x-patch
Size: 15001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170119/6f84753c/attachment.bin>


More information about the llvm-commits mailing list