[SCEV] Strengthen SCEVExpander::isHighCostExpansion.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 14 Apr 2015 03:20:32 +0000 (03:20 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 14 Apr 2015 03:20:32 +0000 (03:20 +0000)
commit17e08f50b98302f1df41f79ae03b3288fd0f2a3a
tree9b53d37d0895b35e21c6ec6eba13df4907d55f59
parentdee1e82714685597252d73394f020f2dd04818f7
[SCEV] Strengthen SCEVExpander::isHighCostExpansion.

Summary:

Teach `isHighCostExpansion` to consider divisions by power-of-two
constants as cheap and add a test case.  This change is needed for a new
user of `isHighCostExpansion` that will be added in a subsequent change.

Depends on D8995.

Reviewers: atrick

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8993

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234845 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolutionExpander.cpp
test/Transforms/IndVarSimplify/lftr-udiv-tripcount.ll [new file with mode: 0644]