brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 0c705c0 Raw
44 lines · plain
1; RUN: llc -mtriple=hexagon -minimum-jump-tables=1 < %s2; REQUIRES: asserts3 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 811declare void @foo() #212declare void @bar(i32, i32) #213 14; Function Attrs: nounwind15define void @fred(i8 signext %a, i8 signext %b) #1 {16entry:17  %i = sext i8 %a to i3218  %t = getelementptr inbounds [3 x %struct.t1], ptr @var, i32 0, i32 %i, i32 3, i32 019  %0 = load i8, ptr %t, align 820  switch i8 %0, label %if.end14 [21    i8 1, label %if.then22    i8 0, label %do.body23  ]24 25if.then:                                          ; preds = %entry26  %j = sext i8 %b to i3227  %u = getelementptr inbounds [3 x %struct.t1], ptr @var, i32 0, i32 %i, i32 3, i32 1, i32 %j28  store i8 1, ptr %u, align 129  tail call void @foo() #030  br label %if.end1431 32do.body:                                          ; preds = %entry33  %conv11 = sext i8 %b to i3234  tail call void @bar(i32 %i, i32 %conv11) #035  br label %if.end1436 37if.end14:                                         ; preds = %entry, %do.body, %if.then38  ret void39}40 41attributes #0 = { nounwind }42attributes #1 = { nounwind "disable-tail-calls"="false" }43attributes #2 = { "disable-tail-calls"="false" }44