Added isValidRewrite() to check the result of ScalarEvolutionExpander.
authorAndrew Trick <atrick@apple.com>
Thu, 17 Mar 2011 23:51:11 +0000 (23:51 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 17 Mar 2011 23:51:11 +0000 (23:51 +0000)
commitb12a754cce0c1d5542af605203a47820edba454d
tree384ff7a7b2bafcf8653b8c98c11787e00ec92bbe
parentead71d59a7685fbbbb92162556680abd9001d37b
Added isValidRewrite() to check the result of ScalarEvolutionExpander.

SCEV may generate expressions composed of multiple pointers, which can
lead to invalid GEP expansion. Until we can teach SCEV to follow strict
pointer rules, make sure no bad GEPs creep into IR.
Fixes rdar://problem/9038671.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127839 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp