[PATCH] Combine bit test + conditional or into simple math

David Majnemer david.majnemer at gmail.com
Sun Apr 14 19:02:41 PDT 2013


This patch simplifies constructs like:

(select (icmp eq (and X, C1), 0), Y, (or Y, C2))

into:

(or (shl (and X, C1), C3), y)

where C3 = Log(C2) - Log(C1)

It includes quite a number of test cases and successfully runs 'make check'
cleanly against r179493.

Thanks
-- 
David Majnemer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130414/46f79944/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: combine_and_shift.diff
Type: application/octet-stream
Size: 5327 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130414/46f79944/attachment.obj>


More information about the llvm-commits mailing list