PR21302. Vectorize only bottom-tested loops.
[oota-llvm.git] / test / Transforms / LoopVectorize / calloc.ll
index 55c1eba23ac63e69c9ba5062f073e1633663ded7..5f441f3e238f9134edf6aca0e29f32e5df0eb75b 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: opt < %s  -loop-vectorize -force-vector-unroll=1 -force-vector-width=4 -dce -instcombine -licm -S | FileCheck %s
+; RUN: opt < %s  -basicaa -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -dce -instcombine -S | FileCheck %s
 
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
 target triple = "x86_64-apple-macosx10.9.0"
@@ -23,7 +23,7 @@ for.body:                                         ; preds = %for.body, %for.body
   %i.030 = phi i64 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
   %shr = lshr i64 %i.030, 1
   %arrayidx = getelementptr inbounds i8* %bytes, i64 %shr
-  %1 = load i8* %arrayidx, align 1, !tbaa !0
+  %1 = load i8* %arrayidx, align 1
   %conv = zext i8 %1 to i32
   %and = shl i64 %i.030, 2
   %neg = and i64 %and, 4
@@ -38,7 +38,7 @@ for.body:                                         ; preds = %for.body, %for.body
   %add17 = add nsw i32 %cond, %shr11
   %conv18 = trunc i32 %add17 to i8
   %arrayidx19 = getelementptr inbounds i8* %call, i64 %i.030
-  store i8 %conv18, i8* %arrayidx19, align 1, !tbaa !0
+  store i8 %conv18, i8* %arrayidx19, align 1
   %inc = add i64 %i.030, 1
   %exitcond = icmp eq i64 %inc, %0
   br i1 %exitcond, label %for.end, label %for.body
@@ -48,6 +48,3 @@ for.end:                                          ; preds = %for.body, %entry
 }
 
 declare noalias i8* @calloc(i64, i64) nounwind
-
-!0 = metadata !{metadata !"omnipotent char", metadata !1}
-!1 = metadata !{metadata !"Simple C/C++ TBAA"}