[PATCH] D27905: AMDGPU: Swap order of operands in fadd/fsub combine

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 18 13:51:38 PST 2016


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

FMA is canonicalized to constant in the middle operand. Do
 the same so fmad matches and avoid an extra combine step.


https://reviews.llvm.org/D27905

Files:
  lib/Target/AMDGPU/SIISelLowering.cpp
  test/CodeGen/AMDGPU/fmul-2-combine-multi-use.ll
  test/CodeGen/AMDGPU/fmuladd.f16.ll
  test/CodeGen/AMDGPU/fmuladd.f32.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27905.81892.patch
Type: text/x-patch
Size: 6155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161218/ae309209/attachment.bin>


More information about the llvm-commits mailing list