1; RUN: opt -simplifycfg -S < %s | FileCheck %s 2 3; Just checking for lack of crash here, but we should be able to check the IR? 4; Earlier version using auto-generated checks from utils/update_test_checks.py 5; had bot problems though... 6 7define void @patatino() { 8 9; CHECK-LABEL: @patatino 10 11 br label %bb1 12bb1: ; preds = %bb36, %0 13 br label %bb2 14bb2: ; preds = %bb3, %bb1 15 br i1 undef, label %bb4, label %bb3 16bb3: ; preds = %bb4, %bb2 17 br i1 undef, label %bb2, label %bb5 18bb4: ; preds = %bb2 19 switch i32 undef, label %bb3 [ 20 ] 21bb5: ; preds = %bb3 22 br label %bb6 23bb6: ; preds = %bb5 24 br i1 undef, label %bb7, label %bb9 25bb7: ; preds = %bb6 26 %tmp = or i64 undef, 1 27 %tmp8 = icmp ult i64 %tmp, 0 28 br i1 %tmp8, label %bb12, label %bb9 29bb9: ; preds = %bb35, %bb34, %bb33, %bb32, %bb31, %bb30, %bb27, %bb24, %bb21, %bb18, %bb16, %bb14, %bb12, %bb7, %bb6 30 br label %bb11 31bb10: ; preds = %bb36 32 br label %bb11 33bb11: ; preds = %bb10, %bb9 34 ret void 35bb12: ; preds = %bb7 36 %tmp13 = icmp ult i64 0, 0 37 br i1 %tmp13, label %bb14, label %bb9 38bb14: ; preds = %bb12 39 %tmp15 = icmp ult i64 undef, 0 40 br i1 %tmp15, label %bb16, label %bb9 41bb16: ; preds = %bb14 42 %tmp17 = icmp ult i64 undef, 0 43 br i1 %tmp17, label %bb18, label %bb9 44bb18: ; preds = %bb16 45 %tmp19 = or i64 undef, 5 46 %tmp20 = icmp ult i64 %tmp19, 0 47 br i1 %tmp20, label %bb21, label %bb9 48bb21: ; preds = %bb18 49 %tmp22 = or i64 undef, 6 50 %tmp23 = icmp ult i64 %tmp22, 0 51 br i1 %tmp23, label %bb24, label %bb9 52bb24: ; preds = %bb21 53 %tmp25 = or i64 undef, 7 54 %tmp26 = icmp ult i64 %tmp25, 0 55 br i1 %tmp26, label %bb27, label %bb9 56bb27: ; preds = %bb24 57 %tmp28 = or i64 undef, 8 58 %tmp29 = icmp ult i64 %tmp28, 0 59 br i1 %tmp29, label %bb30, label %bb9 60bb30: ; preds = %bb27 61 br i1 undef, label %bb31, label %bb9 62bb31: ; preds = %bb30 63 br i1 undef, label %bb32, label %bb9 64bb32: ; preds = %bb31 65 br i1 undef, label %bb33, label %bb9 66bb33: ; preds = %bb32 67 br i1 undef, label %bb34, label %bb9 68bb34: ; preds = %bb33 69 br i1 undef, label %bb35, label %bb9 70bb35: ; preds = %bb34 71 br i1 undef, label %bb36, label %bb9 72bb36: ; preds = %bb35 73 br i1 undef, label %bb1, label %bb10 74} 75