1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v1 < %s -S -verify-dom-info | FileCheck %s
3 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v2 < %s -S -verify-dom-info | FileCheck %s
4 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v3 < %s -S -verify-dom-info | FileCheck %s
6 ; Check that we do not crash when we remove edges multiple times in
11 ; CHECK-NEXT: switch i8 undef, label [[IF_THEN_EPIL:%.*]] [
12 ; CHECK-NEXT: i8 32, label [[FOR_INC_EPIL:%.*]]
13 ; CHECK-NEXT: i8 46, label [[FOR_INC_EPIL]]
14 ; CHECK-NEXT: i8 95, label [[FOR_INC_EPIL]]
15 ; CHECK-NEXT: i8 45, label [[FOR_INC_EPIL]]
16 ; CHECK-NEXT: i8 126, label [[FOR_INC_EPIL]]
18 ; CHECK: if.then.epil:
19 ; CHECK-NEXT: unreachable
20 ; CHECK: for.inc.epil:
21 ; CHECK-NEXT: ret void
24 br label %for.body.epil
26 for.body.epil: ; preds = %entry
27 switch i8 undef, label %if.then.epil [
28 i8 32, label %for.inc.epil
29 i8 46, label %for.inc.epil
30 i8 95, label %for.inc.epil
31 i8 45, label %for.inc.epil
32 i8 126, label %for.inc.epil
35 if.then.epil: ; preds = %for.body.epil
38 for.inc.epil: ; preds = %for.body.epil, %for.body.epil, %for.body.epil, %for.body.epil, %for.body.epil