[PATCH] D121360: [AMDGPU] Enable divergence predicates for negative inline constant subtraction

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 02:06:27 PST 2022


alex-t created this revision.
alex-t added reviewers: rampitec, foad.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl, arsenm.
Herald added a project: All.
alex-t requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

We have a pattern that undo sub x, c -> add x, -c canonicalization since c is more likely
 an inline immediate than -c. This patch enables it to select scalar or vector subtracion by the input node divergence.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121360

Files:
  llvm/lib/Target/AMDGPU/SIInstructions.td
  llvm/test/CodeGen/AMDGPU/divergence-driven-negsubinlineconst.ll
  llvm/test/CodeGen/AMDGPU/shift-i128.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121360.414308.patch
Type: text/x-patch
Size: 11887 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220310/b87905fd/attachment.bin>


More information about the llvm-commits mailing list