This is an archive of the discontinued LLVM Phabricator instance.

shl Optimization InstCombine
AbandonedPublic

Authored by sonamkumari on Jul 16 2014, 10:29 PM.

Details

Summary

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.

Diff Detail

Event Timeline

sonamkumari retitled this revision from to shl Optimization InstCombine.
sonamkumari updated this object.
sonamkumari edited the test plan for this revision. (Show Details)
sonamkumari added a subscriber: Unknown Object (MLST).

Hi Duncan,

Thanks for reviewing and providing valuable comments.
I will work on those comments and get back to you.

Thanks,
Sonam.

sonamkumari abandoned this revision.Nov 27 2014, 12:33 AM