remove unnecessary settings/attributes from test case
[oota-llvm.git] / test / Transforms / LoopVectorize / optsize.ll
1 ; This test verifies that the loop vectorizer will NOT produce a tail
2 ; loop with Optimize for size attibute.
3 ; REQUIRES: asserts
4 ; RUN: opt < %s -loop-vectorize -debug -debug-only=loop-vectorize -S 2>&1 | FileCheck %s
5
6 ; CHECK-NOT: <2 x i8>
7 ; CHECK-NOT: <4 x i8>
8 ; CHECK: Aborting. A tail loop is required in Os.
9
10 target datalayout = "E-m:e-p:32:32-i64:32-f64:32:64-a:0:32-n32-S128"
11
12 @tab = common global [32 x i8] zeroinitializer, align 1
13
14 define i32 @foo() #0 {
15 entry:
16   br label %for.body
17
18 for.body:                                         ; preds = %for.body, %entry
19   %i.08 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
20   %arrayidx = getelementptr inbounds [32 x i8], [32 x i8]* @tab, i32 0, i32 %i.08
21   %0 = load i8, i8* %arrayidx, align 1
22   %cmp1 = icmp eq i8 %0, 0
23   %. = select i1 %cmp1, i8 2, i8 1
24   store i8 %., i8* %arrayidx, align 1
25   %inc = add nsw i32 %i.08, 1
26   %exitcond = icmp eq i32 %i.08, 202
27   br i1 %exitcond, label %for.end, label %for.body
28
29 for.end:                                          ; preds = %for.body
30   ret i32 0
31 }
32
33 attributes #0 = { optsize }
34