[PATCH] D140831: Fix a phase-ordering problem in SimplifyCFG.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 2 06:02:48 PST 2023
nikic added a reviewer: nikic.
nikic added inline comments.
================
Comment at: llvm/test/Transforms/SimplifyCFG/switch-simplify-crash2.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -O2 < %s | FileCheck %s
+
----------------
Outside PhaseOrdering, tests should not use the full optimization pipeline. Here is a reduction of your test case:
```
; RUN: opt -S -passes="simplifycfg<forward-switch-cond;no-keep-loops>" < %s | FileCheck %s
define i8 @test() {
entry:
br label %loop
loop:
%phi1 = phi i8 [ 0, %entry ], [ %phi2, %loop2 ]
br label %loop2
loop2:
%phi2 = phi i8 [ %phi1, %loop ], [ 0, %loop2 ]
switch i8 %phi2, label %loop [
i8 0, label %loop2
i8 1, label %exit
]
exit:
ret i8 0
}
```
Please also reference the issue.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140831/new/
https://reviews.llvm.org/D140831
More information about the llvm-commits
mailing list