[PATCH] shl Optimization InstCombine

sonam kumari sonam.kumari at samsung.com
Wed Jul 16 22:29:56 PDT 2014


Hi rafael, dexonsmith, nicholas,

This patch handles 
(icmp eq/ne (shl const2, A), const1) -> (icmp eq/ne A, log2(const1) - log2(const2)).
I wrote this patch for the equality comparison.
For other comparison operators, it needs to handled.
In the test cases I considered all the boundary conditions for the 32 bit integer and handled them.

Please help in reviewing this patch.
Any comments/suggestions are most welcomed.

Thanks,
Sonam.

http://reviews.llvm.org/D4553

Files:
  lib/Transforms/InstCombine/InstCombineCompares.cpp
  test/Transforms/InstCombine/icmp.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4553.11556.patch
Type: text/x-patch
Size: 6442 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140717/d02cf36a/attachment.bin>


More information about the llvm-commits mailing list