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(ptr nocapture readonly %a0, i32 %a1, i32 %a2, ptr nocapture %a3) #0 {
16 %v2 = tail call <16 x i32> @llvm.hexagon.V6.vsubw(<16 x i32> undef, <16 x i32> undef)
17 %v4 = sdiv i32 %a1, 32
18 %v5 = icmp sgt i32 %a1, 31
19 br i1 %v5, label %b1, label %b4
22 %v7 = icmp sgt i32 %a1, 63
24 %v9 = select i1 %v7, i32 %v8, i32 32
25 %v10 = getelementptr i16, ptr %a3, i32 %v9
28 b2: ; preds = %b2, %b1
29 %v11 = phi i32 [ 0, %b1 ], [ %v19, %b2 ]
30 %v12 = phi <16 x i32> [ %v2, %b1 ], [ %v16, %b2 ]
31 %v13 = phi ptr [ %a3, %b1 ], [ %v18, %b2 ]
32 %v14 = phi ptr [ %a0, %b1 ], [ %v15, %b2 ]
33 %v15 = getelementptr inbounds <16 x i32>, ptr %v14, i32 1
34 %v16 = load <16 x i32>, ptr %v14, align 4, !tbaa !0
35 %v17 = tail call <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32> %v16, <16 x i32> %v12, i32 %v1)
36 %v18 = getelementptr inbounds <16 x i32>, ptr %v13, i32 1
37 store <16 x i32> %v17, ptr %v13, align 4, !tbaa !0
38 %v19 = add nsw i32 %v11, 1
39 %v20 = icmp slt i32 %v19, %v4
40 br i1 %v20, label %b2, label %b3
45 b4: ; preds = %b3, %b0
46 %v22 = phi <16 x i32> [ %v16, %b3 ], [ %v2, %b0 ]
47 %v23 = phi ptr [ %v10, %b3 ], [ %a3, %b0 ]
48 %v24 = tail call <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32> %v2, <16 x i32> %v22, i32 %v1)
49 store <16 x i32> %v24, ptr %v23, align 4, !tbaa !0
53 ; Function Attrs: nounwind readnone
54 declare <16 x i32> @llvm.hexagon.V6.vsubw(<16 x i32>, <16 x i32>) #1
56 ; Function Attrs: nounwind readnone
57 declare <16 x i32> @llvm.hexagon.V6.valignb(<16 x i32>, <16 x i32>, i32) #1
59 attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvxv60,+hvx-length64b" }
60 attributes #1 = { nounwind readnone }
63 !1 = !{!"omnipotent char", !2, i64 0}
64 !2 = !{!"Simple C/C++ TBAA"}