[IndVarSimplify] Ignore unreachable users of truncs
authorMax Kazantsev <max.kazantsev@azul.com>
Thu, 28 Jun 2018 08:20:03 +0000 (08:20 +0000)
committerMax Kazantsev <max.kazantsev@azul.com>
Thu, 28 Jun 2018 08:20:03 +0000 (08:20 +0000)
commitf5ba37182e8259c4de184177027203f303965c5a
tree18ed79c653596db5244fa3807ccf905ce7ca0fb7
parent717c9768d3070050f8c20d7a5b4879e613f126ec
[IndVarSimplify] Ignore unreachable users of truncs

If a trunc has a user in a block which is not reachable from entry,
we can safely perform trunc elimination as if this user didn't exist.

llvm-svn: 335816
llvm/lib/Transforms/Utils/SimplifyIndVar.cpp
llvm/test/Transforms/IndVarSimplify/eliminate-trunc.ll