Home | History | Annotate | Download | only in MergeFunc
      1 ; RUN: opt -mergefunc -disable-output < %s
      2 ; This used to trigger a ConstantExpr::getBitCast assertion.
      3 
      4 define void @t1() unnamed_addr uwtable ssp align 2 {
      5 entry:
      6   switch i32 undef, label %sw.bb12 [
      7     i32 127, label %sw.bb
      8     i32 126, label %sw.bb4
      9   ]
     10 
     11 sw.bb:                                            ; preds = %entry
     12   unreachable
     13 
     14 sw.bb4:                                           ; preds = %entry
     15   unreachable
     16 
     17 sw.bb12:                                          ; preds = %entry
     18   ret void
     19 }
     20 
     21 define void @t2() unnamed_addr uwtable ssp align 2 {
     22 entry:
     23   switch i32 undef, label %sw.bb8 [
     24     i32 4, label %sw.bb
     25     i32 3, label %sw.bb4
     26   ]
     27 
     28 sw.bb:                                            ; preds = %entry
     29   unreachable
     30 
     31 sw.bb4:                                           ; preds = %entry
     32   ret void
     33 
     34 sw.bb8:                                           ; preds = %entry
     35   unreachable
     36 }
     37