[PATCH] D28043: AMDGPU: Undo sub x, c -> add x, -c canonicalization

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 18:52:07 PST 2016


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

This is worse if the original constant is an inline immediate.

      

This should also be done for 64-bit adds, but requires fixing
operand folding bugs first.


https://reviews.llvm.org/D28043

Files:
  lib/Target/AMDGPU/SIInstrInfo.td
  lib/Target/AMDGPU/SIInstructions.td
  lib/Target/AMDGPU/VOP2Instructions.td
  test/CodeGen/AMDGPU/s_addk_i32.ll
  test/CodeGen/AMDGPU/shrink-add-sub-constant.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28043.82303.patch
Type: text/x-patch
Size: 11135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161222/b09b3468/attachment.bin>


More information about the llvm-commits mailing list