1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes=jump-threading < %s | FileCheck %s
4 define void @func(i8 zeroext %p_44) nounwind {
9 ; CHECK-NEXT: br label [[FOR_INC46:%.*]]
12 br i1 false, label %for.cond2, label %if.end50
14 for.cond2: ; preds = %for.inc46, %lor.end, %entry
15 %p_44.addr.1 = phi i8 [ %p_44.addr.1, %lor.end ], [ %p_44, %entry ], [ %p_44.addr.1, %for.inc46 ]
16 br i1 undef, label %for.inc46, label %for.body5
18 for.body5: ; preds = %for.cond2
19 br i1 undef, label %lbl_465, label %if.then9
21 if.then9: ; preds = %for.body5
24 lbl_465: ; preds = %lbl_465, %for.body5
25 %tobool19 = icmp eq i8 undef, 0
26 br i1 %tobool19, label %if.end21, label %lbl_465
28 if.end21: ; preds = %lbl_465
29 %conv23 = zext i8 %p_44.addr.1 to i64
30 %xor = xor i64 %conv23, 1
31 %tobool.i = icmp eq i64 %conv23, 0
32 br i1 %tobool.i, label %cond.false.i, label %safe_mod_func_uint64_t_u_u.exit
34 cond.false.i: ; preds = %if.end21
35 %div.i = udiv i64 %xor, %conv23
36 br label %safe_mod_func_uint64_t_u_u.exit
38 safe_mod_func_uint64_t_u_u.exit: ; preds = %cond.false.i, %if.end21
39 %cond.i = phi i64 [ %div.i, %cond.false.i ], [ %conv23, %if.end21 ]
40 %tobool28 = icmp eq i64 %cond.i, 0
41 br i1 %tobool28, label %lor.rhs, label %lor.end
43 lor.rhs: ; preds = %safe_mod_func_uint64_t_u_u.exit
46 lor.end: ; preds = %lor.rhs, %safe_mod_func_uint64_t_u_u.exit
49 for.inc46: ; preds = %for.cond2
52 if.end50: ; preds = %entry
55 return: ; preds = %if.end50, %if.then9