[PATCH] D76973: [LangRef] Clarify the semantics of branch on undef
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 29 07:59:34 PDT 2020
aqjune marked an inline comment as done.
aqjune added a comment.
With this semantics, separating `if (cond1 && cond2)` into `if (cond1) { if(cond2) { .. } }` becomes incorrect. If cond1 is undef and cond2 is false, this introduces UB.
There are several places where this happens, such as `test/Transforms/SimplifyCFG/switch_create.ll` and `test/SimpleLoopUnswitch/LIV-loop-condtion.ll`. They can be fixed by introducing `freeze`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76973/new/
https://reviews.llvm.org/D76973
More information about the llvm-commits
mailing list