1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt -S -passes=loop-reduce < %s | FileCheck %s
4 ; Make sure it does not assert.
6 ; CHECK-LABEL: define i64 @test() {
8 ; CHECK-NEXT: br label [[BB1:%.*]]
10 ; CHECK-NEXT: br label [[BB2:%.*]]
12 ; CHECK-NEXT: br i1 true, label [[BB5:%.*]], label [[BB2]]
14 ; CHECK-NEXT: br label [[BB1]]
20 %phi = phi i8 [ %zext6, %bb5 ], [ 0, %bb ]
24 %phi3 = phi i8 [ %add, %bb2 ], [ %phi, %bb1 ]
25 %phi4 = phi i32 [ 0, %bb2 ], [ 1, %bb1 ]
26 %add = add i8 %phi3, 1
27 br i1 true, label %bb5, label %bb2
30 %zext = zext i8 %add to i32
31 %icmp = icmp sge i32 %phi4, 0
32 %zext6 = zext i1 %icmp to i8