Avoid creating canonical induction variables for non-native types.
authorAndrew Trick <atrick@apple.com>
Fri, 18 Mar 2011 16:50:32 +0000 (16:50 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 18 Mar 2011 16:50:32 +0000 (16:50 +0000)
commit5fd5b125ff41088c005b7107e8cf92f281313040
treef5a579acd5113f28673eaa0d250564a8ced53fed
parent84161c2f683357938cf283f40bd1ef3e61c317f5
Avoid creating canonical induction variables for non-native types.
For example, on 32-bit architecture, don't promote all uses of the IV
to 64-bits just because one use is a 64-bit cast.
Alternate implementation of the patch by Arnaud de Grandmaison.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127884 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/llvm/Analysis/IVUsers.h
lib/Analysis/IVUsers.cpp
test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll
test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll
test/Transforms/IndVarSimplify/ada-loops.ll
test/Transforms/IndVarSimplify/addrec-gep.ll
test/Transforms/IndVarSimplify/ashr-tripcount.ll
test/Transforms/IndVarSimplify/iv-sext.ll
test/Transforms/IndVarSimplify/iv-zext.ll
test/Transforms/IndVarSimplify/max-pointer.ll
test/Transforms/IndVarSimplify/pointer.ll
test/Transforms/IndVarSimplify/preserve-gep-loop-variant.ll
test/Transforms/IndVarSimplify/preserve-gep-nested.ll
test/Transforms/IndVarSimplify/preserve-gep-remainder.ll
test/Transforms/IndVarSimplify/preserve-gep.ll
test/Transforms/LoopSimplify/merge-exits.ll
test/Transforms/LoopStrengthReduce/invariant_value_first.ll
test/Transforms/LoopStrengthReduce/invariant_value_first_arg.ll
test/Transforms/LoopStrengthReduce/ops_after_indvar.ll
test/Transforms/LoopStrengthReduce/var_stride_used_by_compare.ll