40 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; REQUIRES: asserts3 4; Check that we do not crash.5; CHECK: call foo6 7target triple = "hexagon"8 9%struct.0 = type { ptr, ptr, [2 x ptr], i32, i32, ptr, i32, i32, i32, i32, i32, [2 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }10 11define i32 @fred(ptr %p0) local_unnamed_addr #0 {12entry:13 br i1 undef, label %if.then21, label %for.body.i14 15if.then21: ; preds = %entry16 %.pr = load i32, ptr undef, align 417 switch i32 %.pr, label %cleanup [18 i32 1, label %for.body.i19 i32 3, label %if.then6020 ]21 22for.body.i: ; preds = %for.body.i, %if.then21, %entry23 %0 = load i8, ptr undef, align 124 %cmp7.i = icmp ugt i8 %0, -1725 br i1 %cmp7.i, label %cleanup, label %for.body.i26 27if.then60: ; preds = %if.then2128 %call61 = call i32 @foo(ptr nonnull %p0) #029 br label %cleanup30 31cleanup: ; preds = %if.then60, %for.body.i, %if.then2132 ret i32 undef33}34 35declare i32 @foo(ptr) local_unnamed_addr #036 37 38attributes #0 = { nounwind }39 40