1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S -passes="simplifycfg<forward-switch-cond;no-keep-loops>" < %s | FileCheck %s
7 ; CHECK-NEXT: br label [[LOOP2:%.*]]
9 ; CHECK-NEXT: [[PHI2:%.*]] = phi i8 [ 0, [[ENTRY:%.*]] ], [ [[SPEC_SELECT:%.*]], [[LOOP2]] ]
10 ; CHECK-NEXT: [[COND:%.*]] = icmp eq i8 [[PHI2]], 0
11 ; CHECK-NEXT: [[SPEC_SELECT]] = select i1 [[COND]], i8 0, i8 [[PHI2]]
12 ; CHECK-NEXT: br label [[LOOP2]]
18 %phi1 = phi i8 [ 0, %entry ], [ %phi2, %loop2 ]
22 %phi2 = phi i8 [ %phi1, %loop ], [ 0, %loop2 ]
23 switch i8 %phi2, label %loop [