[PATCH] D142418: AMDGPU: Teach fneg combines that select has source modifiers

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 14 17:52:16 PST 2023


arsenm updated this revision to Diff 497507.
arsenm edited the summary of this revision.
arsenm added a comment.

Don't do the custom / aggressive fold of fneg into select, since it seems tricky to not infinite loop the combiner with foldFreeOpFromSelect. We don't fully lose this, since the generic combiner does fold selects with cheap getNegatedExpression, which doesn't consider free source modifiers. Leave this for a later change


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142418/new/

https://reviews.llvm.org/D142418

Files:
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h
  llvm/test/CodeGen/AMDGPU/fmin_fmax_legacy.amdgcn.ll
  llvm/test/CodeGen/AMDGPU/fneg-combines.ll
  llvm/test/CodeGen/AMDGPU/fneg-combines.new.ll
  llvm/test/CodeGen/AMDGPU/select-fabs-fneg-extract-legacy.ll
  llvm/test/CodeGen/AMDGPU/select-fabs-fneg-extract.f16.ll
  llvm/test/CodeGen/AMDGPU/select-fabs-fneg-extract.legal.f16.ll
  llvm/test/CodeGen/AMDGPU/select-fabs-fneg-extract.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142418.497507.patch
Type: text/x-patch
Size: 54043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230215/30dfb01a/attachment.bin>


More information about the llvm-commits mailing list