1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -indvars < %s | FileCheck %s
4 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 ; CHECK-NEXT: br label [[BB2:%.*]]
11 ; CHECK-NEXT: br label [[BB2]]
13 ; CHECK-NEXT: [[TMP:%.*]] = phi i32 [ -9, [[BB:%.*]] ], [ [[TMP6:%.*]], [[BB1:%.*]] ]
14 ; CHECK-NEXT: br label [[BB3:%.*]]
16 ; CHECK-NEXT: [[TMP4:%.*]] = phi i32 [ -9, [[BB2]] ], [ [[TMP6]], [[BB10:%.*]] ]
17 ; CHECK-NEXT: br i1 false, label [[BB5:%.*]], label [[BB12:%.*]]
19 ; CHECK-NEXT: [[TMP6]] = add nsw i32 [[TMP4]], -1
20 ; CHECK-NEXT: br i1 undef, label [[BB8:%.*]], label [[BB9:%.*]]
22 ; CHECK-NEXT: br label [[BB10]]
24 ; CHECK-NEXT: br label [[BB10]]
26 ; CHECK-NEXT: br label [[BB3]]
28 ; CHECK-NEXT: ret void
34 bb1: ; No predecessors!
37 bb2: ; preds = %bb1, %bb
38 %tmp = phi i32 [ -9, %bb ], [ %tmp6, %bb1 ]
41 bb3: ; preds = %bb10, %bb2
42 %tmp4 = phi i32 [ -9, %bb2 ], [ %tmp6, %bb10 ]
43 br i1 undef, label %bb5, label %bb12
46 %tmp6 = add i32 %tmp4, -1
47 %tmp7 = zext i32 %tmp6 to i64
48 br i1 undef, label %bb8, label %bb9
56 bb10: ; preds = %bb9, %bb8
57 %tmp11 = and i64 undef, %tmp7