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