1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -S -passes=jump-threading < %s | FileCheck %s 3 4define void @func(i8 zeroext %p_44) nounwind { 5; CHECK-LABEL: @func( 6; CHECK-NEXT: return: 7; CHECK-NEXT: ret void 8; CHECK: for.inc46: 9; CHECK-NEXT: br label [[FOR_INC46:%.*]] 10; 11entry: 12 br i1 false, label %for.cond2, label %if.end50 13 14for.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 true, label %for.inc46, label %for.body5 17 18for.body5: ; preds = %for.cond2 19 br i1 false, label %lbl_465, label %if.then9 20 21if.then9: ; preds = %for.body5 22 br label %return 23 24lbl_465: ; preds = %lbl_465, %for.body5 25 br i1 true, label %if.end21, label %lbl_465 26 27if.end21: ; preds = %lbl_465 28 %conv23 = zext i8 %p_44.addr.1 to i64 29 %xor = xor i64 %conv23, 1 30 %tobool.i = icmp eq i64 %conv23, 0 31 br i1 %tobool.i, label %cond.false.i, label %safe_mod_func_uint64_t_u_u.exit 32 33cond.false.i: ; preds = %if.end21 34 %div.i = udiv i64 %xor, %conv23 35 br label %safe_mod_func_uint64_t_u_u.exit 36 37safe_mod_func_uint64_t_u_u.exit: ; preds = %cond.false.i, %if.end21 38 %cond.i = phi i64 [ %div.i, %cond.false.i ], [ %conv23, %if.end21 ] 39 %tobool28 = icmp eq i64 %cond.i, 0 40 br i1 %tobool28, label %lor.rhs, label %lor.end 41 42lor.rhs: ; preds = %safe_mod_func_uint64_t_u_u.exit 43 br label %lor.end 44 45lor.end: ; preds = %lor.rhs, %safe_mod_func_uint64_t_u_u.exit 46 br label %for.cond2 47 48for.inc46: ; preds = %for.cond2 49 br label %for.cond2 50 51if.end50: ; preds = %entry 52 br label %return 53 54return: ; preds = %if.end50, %if.then9 55 ret void 56} 57