1*cee313d2SEric Christopher; RUN: opt -loop-vectorize -tbaa -S -mattr=+neon < %s | FileCheck %s
2*cee313d2SEric Christopher
3*cee313d2SEric Christophertarget datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
4*cee313d2SEric Christophertarget triple = "armv7--linux-gnueabi"
5*cee313d2SEric Christopher
6*cee313d2SEric Christopher; This requires the loop vectorizer to create an interleaved access group
7*cee313d2SEric Christopher; for the stores to the struct. Here we need to perform a bitcast from a vector
8*cee313d2SEric Christopher; of pointers to a vector i32s.
9*cee313d2SEric Christopher
10*cee313d2SEric Christopher%class.A = type { i8*, i32 }
11*cee313d2SEric Christopher
12*cee313d2SEric Christopher; CHECK-LABEL: test0
13*cee313d2SEric Christopherdefine void @test0(%class.A* %StartPtr, %class.A* %APtr) {
14*cee313d2SEric Christopherentry:
15*cee313d2SEric Christopher  br label %for.body.i
16*cee313d2SEric Christopher
17*cee313d2SEric Christopherfor.body.i:
18*cee313d2SEric Christopher  %addr = phi %class.A* [ %StartPtr, %entry ], [ %incdec.ptr.i, %for.body.i ]
19*cee313d2SEric Christopher  %Data.i.i = getelementptr inbounds %class.A, %class.A* %addr, i32 0, i32 0
20*cee313d2SEric Christopher  store i8* null, i8** %Data.i.i, align 4, !tbaa !8
21*cee313d2SEric Christopher  %Length.i.i = getelementptr inbounds %class.A, %class.A* %addr, i32 0, i32 1
22*cee313d2SEric Christopher  store i32 0, i32* %Length.i.i, align 4, !tbaa !11
23*cee313d2SEric Christopher  %incdec.ptr.i = getelementptr inbounds %class.A, %class.A* %addr, i32 1
24*cee313d2SEric Christopher  %cmp.i = icmp eq %class.A* %incdec.ptr.i, %APtr
25*cee313d2SEric Christopher  br i1 %cmp.i, label %exit, label %for.body.i
26*cee313d2SEric Christopher
27*cee313d2SEric Christopherexit:
28*cee313d2SEric Christopher  ret void
29*cee313d2SEric Christopher}
30*cee313d2SEric Christopher
31*cee313d2SEric Christopher!5 = !{!"any pointer", !6, i64 0}
32*cee313d2SEric Christopher!6 = !{!"omnipotent char", !7, i64 0}
33*cee313d2SEric Christopher!7 = !{!"Simple C/C++ TBAA"}
34*cee313d2SEric Christopher!8 = !{!9, !5, i64 0}
35*cee313d2SEric Christopher!9 = !{!"some struct", !5, i64 0, !10, i64 4}
36*cee313d2SEric Christopher!10 = !{!"int", !6, i64 0}
37*cee313d2SEric Christopher!11 = !{!9, !10, i64 4}
38