[LoopPredication] Fix the LoopPredication by feezing the result of predication.
authorSerguei Katkov <serguei.katkov@azul.com>
Wed, 22 Mar 2023 10:10:38 +0000 (17:10 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Wed, 29 Mar 2023 08:12:00 +0000 (15:12 +0700)
commit99da317331e37d530610695b0cf44ba2686b735e
treeacd301194b7013f1c5e10c274e118cdeec842bb4
parent5cb4619a1f561281ded631e5ee3e131d31e43c4d
[LoopPredication] Fix the LoopPredication by feezing the result of predication.

LoopPredication introduces the use of possibly posion value in branch (guard)
instruction, so to avoid introducing undefined behavior it should be frozen.

Reviewed By: mkazantsev
Differential Revision: https://reviews.llvm.org/D146685
12 files changed:
llvm/lib/Transforms/Scalar/LoopPredication.cpp
llvm/test/Transforms/LoopPredication/assumes.ll
llvm/test/Transforms/LoopPredication/basic.ll
llvm/test/Transforms/LoopPredication/basic_widenable_branch_guards.ll
llvm/test/Transforms/LoopPredication/invariant_load.ll
llvm/test/Transforms/LoopPredication/nested.ll
llvm/test/Transforms/LoopPredication/poison.ll
llvm/test/Transforms/LoopPredication/pr61022.ll
llvm/test/Transforms/LoopPredication/profitability.ll
llvm/test/Transforms/LoopPredication/reverse.ll
llvm/test/Transforms/LoopPredication/visited.ll
llvm/test/Transforms/LoopPredication/widened.ll