65 lines · plain
1; RUN: llc %s -aarch64-min-jump-table-entries=4 -o - | FileCheck %s2target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"3target triple = "aarch64"4 5; Function Attrs: nounwind6define dso_local void @f(i64 %v) local_unnamed_addr #0 {7entry:8 %call = tail call i32 @test() #09 %and = and i32 %call, 210 %cmp = icmp eq i32 %and, 011 br i1 %cmp, label %if.then, label %if.else12; CHECK: tbz13; CHECK-NEXT: b14if.then: ; preds = %entry15 switch i64 %v, label %sw.epilog [16 i64 0, label %sw.bb17 i64 1, label %sw.bb118 i64 2, label %sw.bb219 i64 3, label %sw.bb320 ]21 22sw.bb: ; preds = %if.then23 tail call void @g0() #024 br label %sw.bb125 26sw.bb1: ; preds = %if.then, %sw.bb27 tail call void @g1() #028 br label %sw.bb229 30sw.bb2: ; preds = %if.then, %sw.bb131 tail call void @g2() #032 br label %sw.bb333 34sw.bb3: ; preds = %if.then, %sw.bb235 tail call void @g3() #036 br label %sw.epilog37 38sw.epilog: ; preds = %sw.bb3, %if.then39 %dummy = tail call i64 @llvm.aarch64.space(i32 32700, i64 %v)40 br label %if.end41 42if.else: ; preds = %entry43 tail call void @e() #044 br label %if.end45 46if.end: ; preds = %if.else, %sw.epilog47 ret void48}49 50declare dso_local i32 @test(...) local_unnamed_addr #051 52declare dso_local void @g0(...) local_unnamed_addr #053 54declare dso_local void @g1(...) local_unnamed_addr #055 56declare dso_local void @g2(...) local_unnamed_addr #057 58declare dso_local void @g3(...) local_unnamed_addr #059 60declare dso_local void @e(...) local_unnamed_addr #061 62declare dso_local i64 @llvm.aarch64.space(i32, i64) local_unnamed_addr #063 64attributes #0 = { nounwind "branch-target-enforcement" "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="generic" "target-features"="+neon,+v8.5a" "use-soft-float"="false" }65