[all-commits] [llvm/llvm-project] fff136: [SCEV] Add false->any implication
max-azul via All-commits
all-commits at lists.llvm.org
Thu Mar 18 21:57:47 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fff1363ba0ae50da3f8f7b732c90e47e504f18a9
https://github.com/llvm/llvm-project/commit/fff1363ba0ae50da3f8f7b732c90e47e504f18a9
Author: Max Kazantsev <mkazantsev at azul.com>
Date: 2021-03-19 (Fri, 19 Mar 2021)
Changed paths:
M llvm/lib/Analysis/ScalarEvolution.cpp
M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
M llvm/test/Transforms/IndVarSimplify/2011-10-27-lftrnull.ll
M llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
M llvm/test/Transforms/IndVarSimplify/trivial-guard.ll
Log Message:
-----------
[SCEV] Add false->any implication
By definition of Implication operator, `false -> true` and `false -> false`. It means that
`false` implies any predicate, no matter true or false. We don't need to go any further
trying to prove the statement we need and just always say that `false` implies it in this case.
In practice it means that we are trying to prove something guarded by `false` condition,
which means that this code is unreachable, and we can safely prove any fact or perform any
transform in this code.
Differential Revision: https://reviews.llvm.org/D98706
Reviewed By: lebedev.ri
More information about the All-commits
mailing list