1; RUN: llc -march=hexagon < %s | FileCheck %s
2;
3; Check that this compiles successfully.
4; CHECK: jumpr r31
5
6target triple = "hexagon"
7
8define i64 @fred(i64 %a0, i64 %a1) local_unnamed_addr #0 {
9b2:
10  %v3 = lshr i64 %a1, 52
11  %v4 = trunc i64 %v3 to i11
12  switch i11 %v4, label %b15 [
13    i11 -1, label %b5
14    i11 0, label %b14
15  ]
16
17b5:                                               ; preds = %b2
18  br i1 undef, label %b13, label %b6
19
20b6:                                               ; preds = %b5
21  %v7 = or i64 %a1, 2251799813685248
22  br i1 undef, label %b8, label %b10
23
24b8:                                               ; preds = %b6
25  %v9 = select i1 undef, i64 %v7, i64 undef
26  br label %b16
27
28b10:                                              ; preds = %b6
29  br i1 undef, label %b16, label %b11
30
31b11:                                              ; preds = %b10
32  %v12 = select i1 undef, i64 undef, i64 %v7
33  br label %b16
34
35b13:                                              ; preds = %b5
36  br label %b16
37
38b14:                                              ; preds = %b2
39  br label %b16
40
41b15:                                              ; preds = %b2
42  br label %b16
43
44b16:                                              ; preds = %b15, %b14, %b13, %b11, %b10, %b8
45  %v17 = phi i64 [ undef, %b13 ], [ -2251799813685248, %b14 ], [ 0, %b15 ], [ %v12, %b11 ], [ %v9, %b8 ], [ %v7, %b10 ]
46  ret i64 %v17
47}
48
49attributes #0 = { nounwind "target-cpu"="hexagonv62" }
50