1; RUN: llc -march=hexagon -minimum-jump-tables=1 < %s 2; REQUIRES: asserts 3 4target datalayout = "e-m:e-p:32:32:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f64:64:64-f32:32:32-v64:64:64-v32:32:32-a:0-n16:32" 5target triple = "hexagon" 6 7%struct.t0 = type { i8, [2 x i8] } 8%struct.t1 = type { i8, i8, [1900 x i8], %struct.t0 } 9 10@var = internal global [3 x %struct.t1] zeroinitializer, align 8 11declare void @foo() #2 12declare void @bar(i32, i32) #2 13 14; Function Attrs: nounwind 15define void @fred(i8 signext %a, i8 signext %b) #1 { 16entry: 17 %i = sext i8 %a to i32 18 %t = getelementptr inbounds [3 x %struct.t1], [3 x %struct.t1]* @var, i32 0, i32 %i, i32 3, i32 0 19 %0 = load i8, i8* %t, align 8 20 switch i8 %0, label %if.end14 [ 21 i8 1, label %if.then 22 i8 0, label %do.body 23 ] 24 25if.then: ; preds = %entry 26 %j = sext i8 %b to i32 27 %u = getelementptr inbounds [3 x %struct.t1], [3 x %struct.t1]* @var, i32 0, i32 %i, i32 3, i32 1, i32 %j 28 store i8 1, i8* %u, align 1 29 tail call void @foo() #0 30 br label %if.end14 31 32do.body: ; preds = %entry 33 %conv11 = sext i8 %b to i32 34 tail call void @bar(i32 %i, i32 %conv11) #0 35 br label %if.end14 36 37if.end14: ; preds = %entry, %do.body, %if.then 38 ret void 39} 40 41attributes #0 = { nounwind } 42attributes #1 = { nounwind "disable-tail-calls"="false" } 43attributes #2 = { "disable-tail-calls"="false" } 44