[PATCH] D83153: [DAGCombiner] Prevent regression in isMulAddWithConstProfitable

Ben Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 21:38:02 PDT 2020


benshi001 created this revision.
benshi001 added reviewers: spatel, lenary, craig.topper, bogner, t.p.northover.
Herald added subscribers: llvm-commits, ecnelises, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
Herald added a project: LLVM.

In folding (mul (add x, c1), c2) to (add (mul x, c2), c1*c2), there
will be regression if c1 can be directly encoded in a instruction code,
while c1*c2 has to be materialized in a register.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D83153

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/addimm-mulimm.ll
  llvm/test/CodeGen/AArch64/urem-seteq-nonzero.ll
  llvm/test/CodeGen/RISCV/addimm-mulimm.ll
  llvm/test/CodeGen/X86/urem-seteq-nonzero.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83153.275478.patch
Type: text/x-patch
Size: 12386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200704/5c75bd33/attachment.bin>


More information about the llvm-commits mailing list