[PATCH] D107486: [DAGCombiner][AMDGPU] Canonicalize constants to the RHS of MULHU/MULHS.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 4 10:54:24 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: RKSimon, arsenm, foad.
Herald added subscribers: ecnelises, kerbowa, steven.zhang, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
craig.topper requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This allows special constants like to 0 to be recognized. It's also
expected by isel patterns if a target had a mulh with immediate instructions.
The commuting done by tablegen won't commute patterns with immediates since it
expects DAGCombine to have done it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107486

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-idiv.ll
  llvm/test/CodeGen/AMDGPU/sdiv64.ll
  llvm/test/CodeGen/AMDGPU/srem64.ll
  llvm/test/CodeGen/AMDGPU/udiv64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107486.364188.patch
Type: text/x-patch
Size: 16720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210804/8479de66/attachment.bin>


More information about the llvm-commits mailing list