brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 4e882f2 Raw
48 lines · plain
1; RUN: opt -hexagon-autohvx -passes=loop-vectorize -S < %s | FileCheck %s2; Check that the loop is vectorized with VF=32.3; CHECK: wide.load{{.*}} = load <32 x i32>4; CHECK: wide.load{{.*}} = load <32 x i16>5 6target datalayout = "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32:32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32:32:32-v64:64:64-v512:512:512-v1024:1024:1024-v2048:2048:2048"7target triple = "hexagon"8 9define dso_local void @example10a(ptr noalias nocapture %a0, ptr noalias nocapture readonly %a1, ptr noalias nocapture readonly %a2, ptr noalias nocapture %a3, ptr noalias nocapture readonly %a4, ptr noalias nocapture readonly %a5) local_unnamed_addr #0 {10b0:11  br label %b112 13b1:                                               ; preds = %b1, %b014  %v0 = phi i32 [ 0, %b0 ], [ %v13, %b1 ]15  %v1 = getelementptr inbounds i32, ptr %a4, i32 %v016  %v2 = load i32, ptr %v1, align 4, !tbaa !117  %v3 = getelementptr inbounds i32, ptr %a5, i32 %v018  %v4 = load i32, ptr %v3, align 4, !tbaa !119  %v5 = add nsw i32 %v4, %v220  %v6 = getelementptr inbounds i32, ptr %a3, i32 %v021  store i32 %v5, ptr %v6, align 4, !tbaa !122  %v7 = getelementptr inbounds i16, ptr %a1, i32 %v023  %v8 = load i16, ptr %v7, align 2, !tbaa !524  %v9 = getelementptr inbounds i16, ptr %a2, i32 %v025  %v10 = load i16, ptr %v9, align 2, !tbaa !526  %v11 = add i16 %v10, %v827  %v12 = getelementptr inbounds i16, ptr %a0, i32 %v028  store i16 %v11, ptr %v12, align 2, !tbaa !529  %v13 = add nuw nsw i32 %v0, 130  %v14 = icmp eq i32 %v13, 102431  br i1 %v14, label %b2, label %b132 33b2:                                               ; preds = %b134  ret void35}36 37attributes #0 = { noinline norecurse nounwind "target-cpu"="hexagonv60" "target-features"="+hvx-length64b,+hvxv60" }38 39!llvm.module.flags = !{!0}40 41!0 = !{i32 1, !"wchar_size", i32 4}42!1 = !{!2, !2, i64 0}43!2 = !{!"int", !3, i64 0}44!3 = !{!"omnipotent char", !4, i64 0}45!4 = !{!"Simple C++ TBAA"}46!5 = !{!6, !6, i64 0}47!6 = !{!"short", !3, i64 0}48