blob: 9ec933822633e2678e6a5726854f7e217088d62b [file] [log] [blame]
Krzysztof Parzyszek046090d2018-03-12 14:01:28 +00001; RUN: llc -march=hexagon -O2 -hexagon-shrink-frame=0 -hexagon-cext-threshold=1 < %s | FileCheck %s
2
3target triple = "hexagon"
4
5%s.0 = type <{ i8*, i8*, i16, i8, i8, i8 }>
6%s.1 = type { %s.2, [14 x %s.6*], [14 x i8], [6 x i8], [4 x %s.4], [4 x %s.8], [4 x %s.8], [14 x %s.10], %s.6*, %s.6* }
7%s.2 = type { [4 x %s.3], i16, i32, i32, i32, i32 }
8%s.3 = type { i8, i8, i8, i8 }
9%s.4 = type { i8, i32, [16 x %s.5], %s.6, i8, [7 x i8] }
10%s.5 = type { void (i8*)*, i8*, i32 }
11%s.6 = type { %s.7*, i32, %s.7*, i32, i32, i32, %s.7*, %s.7*, i32, i8, i32*, i32, i32, i32*, i32*, i32, i8, i32*, i32, %s.5*, i32, i32, i32, void (%s.6*)*, i32, i8 }
12%s.7 = type { i32, i16, i16 }
13%s.8 = type { %s.9 }
14%s.9 = type { i8*, i32, i32 }
15%s.10 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
16
17@g0 = internal constant %s.0 <{ i8* getelementptr inbounds ([125 x i8], [125 x i8]* @g1, i32 0, i32 0), i8* getelementptr inbounds ([82 x i8], [82 x i8]* @g2, i32 0, i32 0), i16 1694, i8 4, i8 0, i8 0 }>, section ".rodata.diag", align 1
18@g1 = private unnamed_addr constant [125 x i8] c"............................................................................................................................\00", align 8
19@g2 = private unnamed_addr constant [82 x i8] c"Assertion (..............................................................) failed\00", align 8
20@g3 = external global %s.1
21
22define void @f0(%s.6* %a0, i8 zeroext %a1) {
23; look for a dealloc_return in a packet with nothing else.
24;
25; CHECK: if (p{{[0-3]}}) memw(
26; CHECK: }
27; CHECK: {
28; CHECK-NEXT: dealloc_return
29; CHECK-NEXT: }
30b0:
31 %v0 = add i8 %a1, -2
32 %v1 = icmp ugt i8 %v0, 1
33 br i1 %v1, label %b1, label %b2, !prof !0
34
35b1: ; preds = %b0
36 tail call void @f1(%s.0* @g0) #1
37 unreachable
38
39b2: ; preds = %b0
40 %v2 = icmp eq i8 %a1, 2
41 br i1 %v2, label %b3, label %b4
42
43b3: ; preds = %b2
44 store %s.6* %a0, %s.6** getelementptr inbounds (%s.1, %s.1* @g3, i32 0, i32 8), align 4, !tbaa !1
45 br label %b5
46
47b4: ; preds = %b2
48 store %s.6* %a0, %s.6** getelementptr inbounds (%s.1, %s.1* @g3, i32 0, i32 9), align 4, !tbaa !1
49 br label %b5
50
51b5: ; preds = %b4, %b3
52 ret void
53}
54
55; Function Attrs: noreturn
56declare void @f1(%s.0*) #1
57
58attributes #0 = { nounwind "target-cpu"="hexagonv60" }
59attributes #1 = { noreturn }
60
61!0 = !{!"branch_weights", i32 4, i32 64}
62!1 = !{!2, !2, i64 0}
63!2 = !{!"any pointer", !3}
64!3 = !{!"omnipotent char", !4}
65!4 = !{!"Simple C/C++ TBAA"}