Home | History | Annotate | Download | only in SimplifyCFG
      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 
      7 define void @patatino() {
      8 
      9 ; CHECK-LABEL: @patatino
     10 
     11   br label %bb1
     12 bb1:                                              ; preds = %bb36, %0
     13   br label %bb2
     14 bb2:                                              ; preds = %bb3, %bb1
     15   br i1 undef, label %bb4, label %bb3
     16 bb3:                                              ; preds = %bb4, %bb2
     17   br i1 undef, label %bb2, label %bb5
     18 bb4:                                              ; preds = %bb2
     19   switch i32 undef, label %bb3 [
     20   ]
     21 bb5:                                              ; preds = %bb3
     22   br label %bb6
     23 bb6:                                              ; preds = %bb5
     24   br i1 undef, label %bb7, label %bb9
     25 bb7:                                              ; preds = %bb6
     26   %tmp = or i64 undef, 1
     27   %tmp8 = icmp ult i64 %tmp, 0
     28   br i1 %tmp8, label %bb12, label %bb9
     29 bb9:                                              ; preds = %bb35, %bb34, %bb33, %bb32, %bb31, %bb30, %bb27, %bb24, %bb21, %bb18, %bb16, %bb14, %bb12, %bb7, %bb6
     30   br label %bb11
     31 bb10:                                             ; preds = %bb36
     32   br label %bb11
     33 bb11:                                             ; preds = %bb10, %bb9
     34   ret void
     35 bb12:                                             ; preds = %bb7
     36   %tmp13 = icmp ult i64 0, 0
     37   br i1 %tmp13, label %bb14, label %bb9
     38 bb14:                                             ; preds = %bb12
     39   %tmp15 = icmp ult i64 undef, 0
     40   br i1 %tmp15, label %bb16, label %bb9
     41 bb16:                                             ; preds = %bb14
     42   %tmp17 = icmp ult i64 undef, 0
     43   br i1 %tmp17, label %bb18, label %bb9
     44 bb18:                                             ; preds = %bb16
     45   %tmp19 = or i64 undef, 5
     46   %tmp20 = icmp ult i64 %tmp19, 0
     47   br i1 %tmp20, label %bb21, label %bb9
     48 bb21:                                             ; preds = %bb18
     49   %tmp22 = or i64 undef, 6
     50   %tmp23 = icmp ult i64 %tmp22, 0
     51   br i1 %tmp23, label %bb24, label %bb9
     52 bb24:                                             ; preds = %bb21
     53   %tmp25 = or i64 undef, 7
     54   %tmp26 = icmp ult i64 %tmp25, 0
     55   br i1 %tmp26, label %bb27, label %bb9
     56 bb27:                                             ; preds = %bb24
     57   %tmp28 = or i64 undef, 8
     58   %tmp29 = icmp ult i64 %tmp28, 0
     59   br i1 %tmp29, label %bb30, label %bb9
     60 bb30:                                             ; preds = %bb27
     61   br i1 undef, label %bb31, label %bb9
     62 bb31:                                             ; preds = %bb30
     63   br i1 undef, label %bb32, label %bb9
     64 bb32:                                             ; preds = %bb31
     65   br i1 undef, label %bb33, label %bb9
     66 bb33:                                             ; preds = %bb32
     67   br i1 undef, label %bb34, label %bb9
     68 bb34:                                             ; preds = %bb33
     69   br i1 undef, label %bb35, label %bb9
     70 bb35:                                             ; preds = %bb34
     71   br i1 undef, label %bb36, label %bb9
     72 bb36:                                             ; preds = %bb35
     73   br i1 undef, label %bb1, label %bb10
     74 }
     75