1 ; RUN: llc -march=hexagon -disable-hexagon-shuffle=1 -O2 -enable-pipeliner=false < %s | FileCheck %s
3 ; Generate vmemu (unaligned).
9 target triple = "hexagon"
11 ; Function Attrs: nounwind
12 define void @f0(i16* nocapture readonly %a0, i32 %a1, i32 %a2, i16* nocapture %a3) #0 {
16 %v2 = tail call <16 x i32> @llvm.hexagon.V6.vsubw(<16 x i32> undef, <16 x i32> undef)
17 %v3 = bitcast i16* %a3 to <16 x i32>*
18 %v4 = sdiv i32 %a1, 32
19 %v5 = icmp sgt i32 %a1, 31
20 br i1 %v5, label %b1, label %b4
23 %v6 = bitcast i16* %a0 to <16 x i32>*
24 %v7 = icmp sgt i32 %a1, 63
26 %v9 = select i1 %v7, i32 %v8, i32 32
27 %v10 = getelementptr i16, i16* %a3, i32 %v9
30 b2: ; preds = %b2, %b1
31 %v11 = phi i32 [ 0, %b1 ], [ %v19, %b2 ]
32 %v12 = phi <16 x i32> [ %v2, %b1 ], [ %v16, %b2 ]
33 %v13 = phi <16 x i32>* [ %v3, %b1 ], [ %v18, %b2 ]
34 %v14 = phi <16 x i32>* [ %v6, %b1 ], [ %v15, %b2 ]
35 %v15 = getelementptr inbounds <16 x i32>, <16 x i32>* %v14, i32 1
36 %v16 = load <16 x i32>, <16 x i32>* %v14, align 4, !tbaa !0
37 %v17 = tail call <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32> %v16, <16 x i32> %v12, i32 %v1)
38 %v18 = getelementptr inbounds <16 x i32>, <16 x i32>* %v13, i32 1
39 store <16 x i32> %v17, <16 x i32>* %v13, align 4, !tbaa !0
40 %v19 = add nsw i32 %v11, 1
41 %v20 = icmp slt i32 %v19, %v4
42 br i1 %v20, label %b2, label %b3
45 %v21 = bitcast i16* %v10 to <16 x i32>*
48 b4: ; preds = %b3, %b0
49 %v22 = phi <16 x i32> [ %v16, %b3 ], [ %v2, %b0 ]
50 %v23 = phi <16 x i32>* [ %v21, %b3 ], [ %v3, %b0 ]
51 %v24 = tail call <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32> %v2, <16 x i32> %v22, i32 %v1)
52 store <16 x i32> %v24, <16 x i32>* %v23, align 4, !tbaa !0
56 ; Function Attrs: nounwind readnone
57 declare <16 x i32> @llvm.hexagon.V6.vsubw(<16 x i32>, <16 x i32>) #1
59 ; Function Attrs: nounwind readnone
60 declare <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32>, <16 x i32>, i32) #1
62 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
63 attributes #1 = { nounwind readnone }
66 !1 = !{!"omnipotent char", !2, i64 0}
67 !2 = !{!"Simple C/C++ TBAA"}