[IndVars] Remove unreasonable checks in rewriteLoopExitValues
authorMax Kazantsev <max.kazantsev@azul.com>
Tue, 18 Sep 2018 04:57:18 +0000 (04:57 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Tue, 18 Sep 2018 04:57:18 +0000 (04:57 +0000)
commit0994abda3aa6ad490bb78f50e0be99952bdd2361
tree373c67ec0f9dd08cc75f3ba23c5a60a1ccd78dec
parentebf46143eaf7fa3ad956baf8cc876cbe2c6ae306
[IndVars] Remove unreasonable checks in rewriteLoopExitValues

A piece of logic in rewriteLoopExitValues has a weird check on number of
users which allowed an unprofitable transform in case if an instruction has
more than 6 users.

Differential Revision: https://reviews.llvm.org/D51404
Reviewed By: etherzhhb

llvm-svn: 342444
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/test/Transforms/IndVarSimplify/dont-recompute.ll