[PATCH] D48975: [DAG] Support non-uniform X%C -> X-(X/C)*C folds

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 08:53:37 PDT 2018


RKSimon created this revision.
RKSimon added reviewers: spatel, lebedev.ri, efriedma, craig.topper.

First stage in PR38057 - support non-uniform constant vectors in the combine to reuse the division-by-constant logic.

We can definitely do better for srem pow2 remainders (and avoid that extra multiply....) but this at least helps keep everything on the vector unit.


Repository:
  rL LLVM

https://reviews.llvm.org/D48975

Files:
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  test/CodeGen/X86/combine-srem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48975.154248.patch
Type: text/x-patch
Size: 11910 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180705/55a1ae0a/attachment.bin>


More information about the llvm-commits mailing list