[llvm-commits] [PATCH] [InstCombine] Allow for urem optimization to occur when the quotient is a power of two that is being zero extended.

Michael Gottesman mgottesman at apple.com
Mon Oct 1 13:27:11 PDT 2012


Currently LLVM optimizes urem appropriately for power of two quotients if
the numerator and quotient are the same size. On the other hand if the
quotient is a power of two which is zero extended, pattern matching fails
resulting in no optimizations occuring. This patch adds code to InstCombine
to properly match and handle this case.

Patch by David Majnemer. Test Case by me.

Please review,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-InstCombine-Allow-for-urem-optimization-to-occur-whe.patch
Type: application/octet-stream
Size: 3098 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121001/14e9c12a/attachment.obj>
-------------- next part --------------


Michael



More information about the llvm-commits mailing list