Suppress LinearFunctionTestReplace when the computed backedge-taken
authorDan Gohman <gohman@apple.com>
Mon, 12 Apr 2010 21:13:43 +0000 (21:13 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 12 Apr 2010 21:13:43 +0000 (21:13 +0000)
commitca9b7037e28759c200fe5ca98190cabd121a1bba
tree87d9cc525f270334d68ab1c057c8cba7b5cc8e81
parentdae9efc23e959d4452f5b67706896ea292b687f3
Suppress LinearFunctionTestReplace when the computed backedge-taken
expression is a UDiv and it doesn't appear that the UDiv came from
the user's source.

ScalarEvolution has recently figured out how to compute a tripcount
expression for the inner loop in
SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a
udiv instruction dramatically slows down the enclosing loop.

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