1; RUN: llc -march=hexagon -debug-only=isel < %s 2>&1 | FileCheck %s
2; REQUIRES: asserts
3
4; Check that the generated post-increment load has TBAA information.
5; CHECK-LABEL: Machine code for function fred:
6; CHECK: = V6_vL32b_pi %{{[0-9]+}}{{[^,]*}}, 64 :: (load (s512){{.*}}!tbaa
7
8target triple = "hexagon"
9
10; Function Attrs: norecurse nounwind
11define void @fred(<16 x i32>* nocapture %p, <16 x i32>* nocapture readonly %q, i32 %n) local_unnamed_addr #0 {
12entry:
13  %tobool2 = icmp eq i32 %n, 0
14  br i1 %tobool2, label %while.end, label %while.body
15
16while.body:                                       ; preds = %entry, %while.body
17  %n.addr.05 = phi i32 [ %dec, %while.body ], [ %n, %entry ]
18  %q.addr.04 = phi <16 x i32>* [ %incdec.ptr, %while.body ], [ %q, %entry ]
19  %p.addr.03 = phi <16 x i32>* [ %incdec.ptr1, %while.body ], [ %p, %entry ]
20  %dec = add i32 %n.addr.05, -1
21  %incdec.ptr = getelementptr inbounds <16 x i32>, <16 x i32>* %q.addr.04, i32 1
22  %0 = load <16 x i32>, <16 x i32>* %q.addr.04, align 64, !tbaa !1
23  %incdec.ptr1 = getelementptr inbounds <16 x i32>, <16 x i32>* %p.addr.03, i32 1
24  store <16 x i32> %0, <16 x i32>* %p.addr.03, align 64, !tbaa !1
25  %tobool = icmp eq i32 %dec, 0
26  br i1 %tobool, label %while.end, label %while.body
27
28while.end:                                        ; preds = %while.body, %entry
29  ret void
30}
31
32attributes #0 = { norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx,+hvx-length64b" }
33
34
35!1 = !{!2, !2, i64 0}
36!2 = !{!"omnipotent char", !3, i64 0}
37!3 = !{!"Simple C/C++ TBAA"}
38