[PATCH] D106471: [DAGCombiner][RISCV][AMDGPU] Call SimplifyDemandedBits at the end of visitMULHU to enable known bits contant folding.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 21 11:53:14 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: efriedma, frasercrmck, spatel, RKSimon.
Herald added subscribers: vkmr, ecnelises, evandro, kerbowa, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
craig.topper requested review of this revision.
Herald added subscribers: MaskRay, wdng.
Herald added a project: LLVM.

We don't have real demanded bits support for MULHU, but we can
still use the known bits based constant folding support at the end
of SimplifyDemandedBits to simplify a MULHU. This helps with cases
where we know the LHS and RHS have enough leading zeros so that
the high multiply result is always 0.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106471

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AMDGPU/sdiv64.ll
  llvm/test/CodeGen/AMDGPU/srem64.ll
  llvm/test/CodeGen/AMDGPU/udiv64.ll
  llvm/test/CodeGen/RISCV/rvv/rvv-vscale.i64.ll
  llvm/test/CodeGen/RISCV/rvv/stepvector.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106471.360543.patch
Type: text/x-patch
Size: 21395 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210721/9a4d7e2a/attachment.bin>


More information about the llvm-commits mailing list