blob: 41ad3b27b5a7dd8b62eaac47d9025f8a414ffdec [file] [log] [blame]
Dan Gohmanfce288f2009-09-09 00:09:15 +00001; RUN: llc < %s -march=sparc
Anton Korobeynikov7294b582007-05-09 20:07:08 +00002
3; We cannot emit jump tables on Sparc, but we should correctly handle this case.
4
5target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
6
7define i32 @foo(i32 %f) {
8entry:
9 switch i32 %f, label %bb14 [
10 i32 0, label %UnifiedReturnBlock
11 i32 1, label %bb4
12 i32 2, label %bb7
13 i32 3, label %bb10
14 ]
15
16bb4: ; preds = %entry
17 ret i32 2
18
19bb7: ; preds = %entry
20 ret i32 5
21
22bb10: ; preds = %entry
23 ret i32 9
24
25bb14: ; preds = %entry
26 ret i32 0
27
28UnifiedReturnBlock: ; preds = %entry
29 ret i32 1
30}