xref: /llvm-project/llvm/test/Transforms/LoopVectorize/2016-07-27-loop-vec.ll (revision 2e14900db9a8c2e03f9933ed2222825454905214)
1*2e14900dSBjorn Pettersson; RUN: opt < %s -passes=loop-vectorize -S
2cee313d2SEric Christopher
3cee313d2SEric Christopherdefine void @foo() local_unnamed_addr {
4cee313d2SEric Christopherentry:
5cee313d2SEric Christopher  %exitcond = icmp eq i64 3, 3
6cee313d2SEric Christopher  br label %for.body
7cee313d2SEric Christopher
8cee313d2SEric Christopherfor.body:                                         ; preds = %entry
9cee313d2SEric Christopher  %i.05 = phi i64 [ %inc, %for.body ], [ 0, %entry ]
10cee313d2SEric Christopher  %total1 = add nsw i64 %i.05, 3
11cee313d2SEric Christopher  %inc = add nuw nsw i64 %i.05, 1
12cee313d2SEric Christopher  br i1 %exitcond, label %for.end, label %for.body, !llvm.loop !0
13cee313d2SEric Christopher
14cee313d2SEric Christopherfor.end:                                          ; preds = %for.body
15cee313d2SEric Christopher  ret void
16cee313d2SEric Christopher}
17cee313d2SEric Christopher
18cee313d2SEric Christopher!0 = distinct !{!0, !1}
19cee313d2SEric Christopher!1 = !{!"llvm.loop.vectorize.enable", i1 true}
20