1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2; RUN: opt -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2 -S -passes=loop-vectorize -vectorize-memory-check-threshold=60 < %s -o - | FileCheck %s 3 4; The case will do aggressive interleave on PowerPC, resulting in a lot of memory checks. 5; (On the A2, always unroll aggressively. In fact, if aggressive interleaving is enabled, 6; similar issues may occur on other targets). 7; Interleaving should also be restricted by the threshold of memory checks similar to VF. 8; (e.g., runtime-memory-check-threshold, default 8). 9 10; CHECK-LABEL: @eddy_diff_caleddy_ 11; CHECK-NOT: vector.memcheck 12 13define fastcc void @eddy_diff_caleddy_(ptr %wet_cl, i64 %0, i32 %ncol.cast.val) { 14entry: 15 %trip.count = add nuw i32 %ncol.cast.val, 1 16 %wide.trip.count = zext i32 %ncol.cast.val to i64 17 %1 = shl i64 %0, 1 18 %2 = mul i64 %0, 3 19 %3 = shl i64 %0, 2 20 %4 = mul i64 %0, 5 21 %5 = mul i64 %0, 6 22 %6 = mul i64 %0, 7 23 %7 = shl i64 %0, 3 24 %8 = mul i64 %0, 9 25 %9 = mul i64 %0, 10 26 %10 = mul i64 %0, 11 27 %11 = mul i64 %0, 12 28 br label %loop.body 29 30loop.body: 31 %indvars.iv774 = phi i64 [ 0, %entry ], [ %indvars.iv.next775, %loop.body ] 32 %12 = add nsw i64 %indvars.iv774, -5 33 %13 = add i64 %12, %0 34 %14 = getelementptr i64, ptr %wet_cl, i64 %13 35 store double 0.000000e+00, ptr %14, align 8 36 %15 = add i64 %12, %1 37 %16 = getelementptr i64, ptr %wet_cl, i64 %15 38 store double 0.000000e+00, ptr %16, align 8 39 %17 = add i64 %12, %2 40 %18 = getelementptr i64, ptr %wet_cl, i64 %17 41 store double 0.000000e+00, ptr %18, align 8 42 %19 = add i64 %12, %3 43 %20 = getelementptr i64, ptr %wet_cl, i64 %19 44 store double 0.000000e+00, ptr %20, align 8 45 %21 = add i64 %12, %4 46 %22 = getelementptr i64, ptr %wet_cl, i64 %21 47 store double 0.000000e+00, ptr %22, align 8 48 %23 = add i64 %12, %5 49 %24 = getelementptr i64, ptr %wet_cl, i64 %23 50 store double 0.000000e+00, ptr %24, align 8 51 %25 = add i64 %12, %6 52 %26 = getelementptr i64, ptr %wet_cl, i64 %25 53 store double 0.000000e+00, ptr %26, align 8 54 %27 = add i64 %12, %7 55 %28 = getelementptr i64, ptr %wet_cl, i64 %27 56 store double 0.000000e+00, ptr %28, align 8 57 %29 = add i64 %12, %8 58 %30 = getelementptr i64, ptr %wet_cl, i64 %29 59 store double 0.000000e+00, ptr %30, align 8 60 %31 = add i64 %12, %9 61 %32 = getelementptr i64, ptr %wet_cl, i64 %31 62 store double 0.000000e+00, ptr %32, align 8 63 %33 = add i64 %12, %10 64 %34 = getelementptr i64, ptr %wet_cl, i64 %33 65 store double 0.000000e+00, ptr %34, align 8 66 %35 = add i64 %12, %11 67 %36 = getelementptr i64, ptr %wet_cl, i64 %35 68 store double 0.000000e+00, ptr %36, align 8 69 %indvars.iv.next775 = add nuw nsw i64 %indvars.iv774, 1 70 %exitcond778.not = icmp eq i64 %indvars.iv.next775, %wide.trip.count 71 br i1 %exitcond778.not, label %loop.end, label %loop.body 72 73loop.end: 74 ret void 75} 76