[PATCH] D59041: [SDAG][X86] Expand pow2 mulo using shifts

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 6 12:32:45 PST 2019


nikic created this revision.
nikic added reviewers: RKSimon, spatel.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Expand MULO with constant power of two operand to a shift. The overflow is checked with (x << shift) >> shift == x.


Repository:
  rL LLVM

https://reviews.llvm.org/D59041

Files:
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/test/CodeGen/X86/mulo-pow2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59041.189560.patch
Type: text/x-patch
Size: 7753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190306/e19b2854/attachment.bin>


More information about the llvm-commits mailing list