[PATCH] D84056: [FPEnv] Don't transform FSUB(-0, X) -> FNEG(X) in SelectionDAGBuilder.

Cameron McInally via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 10:47:40 PDT 2020


cameron.mcinally created this revision.
cameron.mcinally added a reviewer: arsenm.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, tpr, nhaehnle, wdng, jvesely.
Herald added a project: LLVM.

This is a subset of the patch in D73978 <https://reviews.llvm.org/D73978>. Hopefully this change is easier to digest...

This patch stops unconditionally transforming FSUB(-0, X) into an FNEG(X) while building the DAG. There are also two small changes to handle the new FSUB(-0,X) similarly to FNEG(X).

I've left some NOTE comments in the tests to illustrate the assembly changes, since I'm not that familiar with AMDGPU. These are just to ease reviewing. I'll remove those comments if the asm looks acceptable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84056

Files:
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/AMDGPU/SIISelLowering.cpp
  llvm/test/CodeGen/AMDGPU/fdiv32-to-rcp-folding.ll
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fmed3.ll
  llvm/test/CodeGen/AMDGPU/selectcc-opt.ll
  llvm/test/CodeGen/AMDGPU/set-dx10.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84056.278840.patch
Type: text/x-patch
Size: 8436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200717/b2651e44/attachment.bin>


More information about the llvm-commits mailing list