2 ; RUN: opt -S -passes=dfa-jump-threading -dfa-max-path-length=3 %s \
3 ; RUN: 2>&1 -disable-output -debug-only=dfa-jump-threading | FileCheck %s
4 ; RUN: opt -S -passes=dfa-jump-threading -dfa-max-num-visited-paths=3 %s \
5 ; RUN: 2>&1 -disable-output -debug-only=dfa-jump-threading | FileCheck %s
8 ; < case1 case1.1 case1.2 case1.3 case1.4 for.inc for.body > [ 3, case1 ]
9 ; too long so that it is not jump-threaded.
10 define i32 @max_path_length(i32 %num) {
12 ; CHECK: < case2 for.inc for.body > [ 1, for.inc ]
13 ; CHECK-NEXT: < for.inc for.body > [ 1, for.inc ]
14 ; CHECK-NEXT: < case2 sel.si.unfold.false for.inc for.body > [ 2, sel.si.unfold.false ]
15 ; CHECK-NEXT: DFA-JT: Renaming non-local uses of:
20 %count = phi i32 [ 0, %entry ], [ %inc, %for.inc ]
21 %state = phi i32 [ 1, %entry ], [ %state.next, %for.inc ]
22 switch i32 %state, label %for.inc [
28 %case1.state.next = phi i32 [ 3, %for.body ]
44 %cmp = icmp eq i32 %count, 50
45 %sel = select i1 %cmp, i32 1, i32 2
49 %state.next = phi i32 [ %sel, %case2 ], [ 1, %for.body ], [ %case1.state.next, %case1.4 ]
50 %inc = add nsw i32 %count, 1
51 %cmp.exit = icmp slt i32 %inc, %num
52 br i1 %cmp.exit, label %for.body, label %for.end