[SCEV] Make SCEV or modeling more aggressive.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 19 Apr 2017 20:19:58 +0000 (20:19 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 19 Apr 2017 20:19:58 +0000 (20:19 +0000)
commite77d2b86b478872128ab31d8296840161068fd26
tree1daf3770d58af05d7a7d722c292c8b0600876208
parentb45905c5a9b4c17637e951f52a5caaf535cbdc53
[SCEV] Make SCEV or modeling more aggressive.

Use haveNoCommonBitsSet to figure out whether an "or" instruction
is equivalent to addition. This handles more cases than just
checking for a constant on the RHS.

Differential Revision: https://reviews.llvm.org/D32239

llvm-svn: 300746
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/or-as-add.ll [new file with mode: 0644]