1; RUN: opt < %s -loop-vectorize -S 2>&1 | FileCheck %s 2target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 3target triple = "x86_64-unknown-linux-gnu" 4 5; This test makes sure we don't duplicate the loop vectorizer's metadata 6; while marking them as already vectorized (by setting width = 1), even 7; at lower optimization levels, where no extra cleanup is done 8 9define void @_Z3fooPf(float* %a) { 10entry: 11 br label %for.body 12 13for.body: ; preds = %for.body, %entry 14 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] 15 %arrayidx = getelementptr inbounds float, float* %a, i64 %indvars.iv 16 %p = load float, float* %arrayidx, align 4 17 %mul = fmul float %p, 2.000000e+00 18 store float %mul, float* %arrayidx, align 4 19 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 20 %exitcond = icmp eq i64 %indvars.iv.next, 1024 21 br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !0 22 23for.end: ; preds = %for.body 24 ret void 25} 26 27!0 = !{!0, !1} 28!1 = !{!"llvm.loop.vectorize.width", i32 4} 29; CHECK-NOT: !{metadata !"llvm.loop.vectorize.width", i32 4} 30; CHECK: !{!"llvm.loop.interleave.count", i32 1} 31