1 ; Test to make sure loop vectorizer metadata is automatically upgraded. 2 ; 3 ; RUN: llvm-dis < %s.bc | FileCheck %s 4 5 define void @_Z28loop_with_vectorize_metadatav() { 6 entry: 7 %i = alloca i32, align 4 8 store i32 0, i32* %i, align 4 9 br label %for.cond 10 11 for.cond: ; preds = %for.inc, %entry 12 %0 = load i32* %i, align 4 13 %cmp = icmp slt i32 %0, 16 14 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !1 15 16 for.body: ; preds = %for.cond 17 br label %for.inc 18 19 for.inc: ; preds = %for.body 20 %1 = load i32* %i, align 4 21 %inc = add nsw i32 %1, 1 22 store i32 %inc, i32* %i, align 4 23 br label %for.cond 24 25 for.end: ; preds = %for.cond 26 ret void 27 } 28 29 ; CHECK: !{metadata !"llvm.loop.vectorize.unroll", i32 4} 30 ; CHECK: !{metadata !"llvm.loop.vectorize.width", i32 8} 31 ; CHECK: !{metadata !"llvm.loop.vectorize.enable", i1 true} 32 33 !0 = metadata !{metadata !"clang version 3.5.0 (trunk 211528)"} 34 !1 = metadata !{metadata !1, metadata !2, metadata !3, metadata !4, metadata !4} 35 !2 = metadata !{metadata !"llvm.vectorizer.unroll", i32 4} 36 !3 = metadata !{metadata !"llvm.vectorizer.width", i32 8} 37 !4 = metadata !{metadata !"llvm.vectorizer.enable", i1 true} 38