1 ; RUN: llc < %s -mtriple=arm64-eabi
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)
8 define void @test(i1 zeroext %IsArrow) nounwind ssp align 2 {
10 br i1 undef, label %return, label %lor.lhs.false
13 br i1 undef, label %return, label %if.end
16 %tmp.i = load i64, ptr 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
21 br i1 undef, label %if.end32, label %return
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, ptr undef, align 8
30 br i1 undef, label %sw.bb.i.i, label %exit