[PATCH] D26090: [NVPTX] Compute 'rem' using the result of 'div', if possible.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 10:55:49 PDT 2016


jlebar created this revision.
jlebar added a reviewer: tra.
jlebar added subscribers: jholewinski, llvm-commits, hfinkel.

In isel, transform

  Num % Den

into

  Num - (Num / Den) * Den

if the result of Num / Den is already available.


https://reviews.llvm.org/D26090

Files:
  llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp
  llvm/test/CodeGen/NVPTX/divrem-combine.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26090.76219.patch
Type: text/x-patch
Size: 5540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/a12066b2/attachment.bin>


More information about the llvm-commits mailing list