Return "[SCEV] Use context to strengthen flags of BinOps"
authorMax Kazantsev <mkazantsev@azul.com>
Tue, 16 Aug 2022 06:41:59 +0000 (13:41 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Tue, 16 Aug 2022 07:12:36 +0000 (14:12 +0700)
commitebabd6bf1889d38660f5e00c8b2d3724f9ee7e4a
treeddca823022ba72e75cf2828ed8781e0387d4aa50
parente6933044a7eaa33db36e4138583fa7bf0893d1cc
Return "[SCEV] Use context to strengthen flags of BinOps"

This reverts commit 354fa0b48008eca701a110badd6974bf449df257.

Returning as is. The patch was reverted due to a miscompile, but
this patch is not causing it. This patch made it possible to infer
some nuw flags in code guarded by `false` condition, and then someone
else to managed to propagate the flag from dead code outside.

Returning the patch to be able to reproduce the issue.
12 files changed:
llvm/include/llvm/Analysis/ScalarEvolution.h
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Transforms/IndVarSimplify/AArch64/widen-loop-comp.ll
llvm/test/Transforms/IndVarSimplify/X86/iv-widen.ll
llvm/test/Transforms/IndVarSimplify/X86/pr35406.ll
llvm/test/Transforms/IndVarSimplify/bbi-63564.ll
llvm/test/Transforms/IndVarSimplify/cycled_phis.ll
llvm/test/Transforms/IndVarSimplify/eliminate-comparison.ll
llvm/test/Transforms/IndVarSimplify/finite-exit-comparisons.ll
llvm/test/Transforms/IndVarSimplify/loop-predication.ll
llvm/test/Transforms/IndVarSimplify/trivial-guard.ll
llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll