[all-commits] [llvm/llvm-project] a4a9b6: [SimplifyCFG] Handle degenerate conditional branch...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Tue Jul 28 10:58:24 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a4a9b6864c6f185500f08a5a037d93b5e67657dc
https://github.com/llvm/llvm-project/commit/a4a9b6864c6f185500f08a5a037d93b5e67657dc
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2026-07-28 (Tue, 28 Jul 2026)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/Transforms/SimplifyCFG/UnreachableEliminate.ll
Log Message:
-----------
[SimplifyCFG] Handle degenerate conditional branch (#212552)
IR before entering the function:
```
define void @func(i1 %cond) {
entry:
br i1 %cond, label %exit, label %exit
exit: ; preds = %entry, %entry
%phi = phi i1 [ false, %entry ], [ false, %entry ]
tail call void @llvm.assume(i1 %phi)
ret void
}
```
The original code only removes one edge. There is still an edge from
entry to exit, triggering the `Deleted edge still exists in the CFG`
assertion.
Closes https://github.com/llvm/llvm-project/issues/212542
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list