Home | History | Annotate | Download | only in AArch64
      1 ; RUN: llc < %s -march=arm64
      2 
      3 ; The target lowering for integer comparisons was replacing some DAG nodes
      4 ; during operation legalization, which resulted in dangling pointers,
      5 ; cycles in DAGs, and eventually crashes.  This is the testcase for
      6 ; one of those crashes. (rdar://10653656)
      7 
      8 define void @test(i1 zeroext %IsArrow) nounwind ssp align 2 {
      9 entry:
     10   br i1 undef, label %return, label %lor.lhs.false
     11 
     12 lor.lhs.false:
     13   br i1 undef, label %return, label %if.end
     14 
     15 if.end:
     16   %tmp.i = load i64* undef, align 8
     17   %and.i.i.i = and i64 %tmp.i, -16
     18   br i1 %IsArrow, label %if.else_crit_edge, label %if.end32
     19 
     20 if.else_crit_edge:
     21   br i1 undef, label %if.end32, label %return
     22 
     23 if.end32:
     24   %0 = icmp ult i32 undef, 3
     25   %1 = zext i64 %tmp.i to i320
     26   %.pn.v = select i1 %0, i320 128, i320 64
     27   %.pn = shl i320 %1, %.pn.v
     28   %ins346392 = or i320 %.pn, 0
     29   store i320 %ins346392, i320* undef, align 8
     30   br i1 undef, label %sw.bb.i.i, label %exit
     31 
     32 sw.bb.i.i:
     33   unreachable
     34 
     35 exit:
     36   unreachable
     37 
     38 return:
     39   ret void
     40 }
     41