[all-commits] [llvm/llvm-project] 073b25: [SimplifyCFG] Redirect switch cases that lead to U...
Max Kazantsev via All-commits
all-commits at lists.llvm.org
Mon Sep 20 20:45:47 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 073b254cffeffdef36ffbee0c9afdc0da9cd6ac3
https://github.com/llvm/llvm-project/commit/073b254cffeffdef36ffbee0c9afdc0da9cd6ac3
Author: Max Kazantsev <mkazantsev at azul.com>
Date: 2021-09-21 (Tue, 21 Sep 2021)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/CodeGen/AArch64/arm64-ccmp.ll
M llvm/test/Transforms/SimplifyCFG/switch_ub.ll
Log Message:
-----------
[SimplifyCFG] Redirect switch cases that lead to UB into an unreachable block
When following a case of a switch instruction is guaranteed to lead to
UB, we can safely break these edges and redirect those cases into a newly
created unreachable block. As result, CFG will become simpler and we can
remove some of Phi inputs to make further analyzes easier.
Patch by Dmitry Bakunevich!
Differential Revision: https://reviews.llvm.org/D109428
Reviewed By: lebedev.ri
More information about the All-commits
mailing list