diff options
Diffstat (limited to 'test/Transforms/LoopVectorize/vectorize-once.ll')
-rw-r--r-- | test/Transforms/LoopVectorize/vectorize-once.ll | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/Transforms/LoopVectorize/vectorize-once.ll b/test/Transforms/LoopVectorize/vectorize-once.ll index f289ded..2b8f3fd 100644 --- a/test/Transforms/LoopVectorize/vectorize-once.ll +++ b/test/Transforms/LoopVectorize/vectorize-once.ll @@ -11,7 +11,7 @@ target triple = "x86_64-apple-macosx10.8.0" ; This test checks that we add metadata to vectorized loops ; CHECK: _Z4foo1Pii ; CHECK: <4 x i32> -; CHECK: llvm.vectorizer.already_vectorized +; CHECK: llvm.loop ; CHECK: ret ; This test comes from the loop: @@ -40,10 +40,10 @@ _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry ret i32 %__init.addr.0.lcssa.i } -; This test checks that we don't vectorize loops that are marked with the "already vectorized" metadata. +; This test checks that we don't vectorize loops that are marked with the "width" == 1 metadata. ; CHECK: _Z4foo2Pii ; CHECK-NOT: <4 x i32> -; CHECK: llvm.vectorizer.already_vectorized +; CHECK: llvm.loop ; CHECK: ret define i32 @_Z4foo2Pii(i32* %A, i32 %n) #0 { entry: @@ -59,7 +59,7 @@ for.body.i: ; preds = %entry, %for.body.i %add.i = add nsw i32 %0, %__init.addr.05.i %incdec.ptr.i = getelementptr inbounds i32* %__first.addr.04.i, i64 1 %cmp.i = icmp eq i32* %incdec.ptr.i, %add.ptr - br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i, !llvm.vectorizer.already_vectorized !3 + br i1 %cmp.i, label %_ZSt10accumulateIPiiET0_T_S2_S1_.exit, label %for.body.i, !llvm.loop !0 _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry %__init.addr.0.lcssa.i = phi i32 [ 0, %entry ], [ %add.i, %for.body.i ] @@ -68,5 +68,9 @@ _ZSt10accumulateIPiiET0_T_S2_S1_.exit: ; preds = %for.body.i, %entry attributes #0 = { nounwind readonly ssp uwtable "fp-contract-model"="standard" "no-frame-pointer-elim" "no-frame-pointer-elim-non-leaf" "realign-stack" "relocation-model"="pic" "ssp-buffers-size"="8" } -!3 = metadata !{} +; CHECK: !0 = metadata !{metadata !0, metadata !1} +; CHECK: !1 = metadata !{metadata !"llvm.vectorizer.width", i32 1} +; CHECK: !2 = metadata !{metadata !2, metadata !1} +!0 = metadata !{metadata !0, metadata !1} +!1 = metadata !{metadata !"llvm.vectorizer.width", i32 1} |