Add compile command to each testcase
[gcc-vect-testsuite.git] / bb-slp-20.ll
blob2335014cc9836ae7c1e92fef9d1bbbd788699871
1 ; RUN: opt %loadPolly %defaultOpts -polly-codegen -enable-polly-vector -dce -S %s | FileCheck %s
2 ; Obtained from C source as:
3 ; clang -S -emit-llvm -O0 bb-slp-20.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer bb-slp-20.s > bb-slp-20.ll
6 ; ModuleID = 'bb-slp-20.s'
7 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"
8 target triple = "x86_64-unknown-linux-gnu"
10 @in = global [16 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15], align 16
11 @b = common global [16 x i32] zeroinitializer, align 16
12 @out = common global [16 x i32] zeroinitializer, align 16
14 define i32 @main1(i32 %x, i32 %y) nounwind uwtable noinline {
15 entry:
16   %cmp = icmp ugt i32 %x, %y
17   br i1 %cmp, label %if.then, label %if.else
19 if.then:                                          ; preds = %entry
20   %add = add i32 %x, %y
21   br label %if.end
23 if.else:                                          ; preds = %entry
24   br label %if.end
26 if.end:                                           ; preds = %if.else, %if.then
27   %y.addr.0 = phi i32 [ %y, %if.then ], [ %x, %if.else ]
28   %x.addr.0 = phi i32 [ %add, %if.then ], [ %x, %if.else ]
29   %tmp5 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 0), align 16
30   %add6 = add i32 %tmp5, 23
31   %tmp7 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 1), align 4
32   %add8 = add i32 %tmp7, 142
33   %tmp9 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 2), align 8
34   %add10 = add i32 %tmp9, 2
35   %tmp11 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 3), align 4
36   %add12 = add i32 %tmp11, 31
37   %sub = sub i32 -23, %tmp5
38   store i32 %sub, i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 0), align 16
39   %sub15 = sub i32 -142, %tmp7
40   store i32 %sub15, i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 1), align 4
41   %sub17 = sub i32 -2, %tmp9
42   store i32 %sub17, i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 2), align 8
43   %sub19 = sub i32 -31, %tmp11
44   store i32 %sub19, i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 3), align 4
45   %mul = mul i32 %add6, %x.addr.0
46   store i32 %mul, i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 0), align 16
47   %mul24 = mul i32 %add8, %y.addr.0
48   store i32 %mul24, i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 1), align 4
49   %mul27 = mul i32 %add10, %x.addr.0
50   store i32 %mul27, i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 2), align 8
51   %mul30 = mul i32 %add12, %y.addr.0
52   store i32 %mul30, i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 3), align 4
53   %tobool = icmp eq i32 %x.addr.0, 0
54   br i1 %tobool, label %if.end33, label %if.then32
56 if.then32:                                        ; preds = %if.end
57   call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0
58   br label %if.end33
60 if.end33:                                         ; preds = %if.end, %if.then32
61   %tmp34 = load i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 0), align 16
62   %tmp35 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 0), align 16
63   %add36 = add i32 %tmp35, 23
64   %mul38 = mul i32 %add36, %x.addr.0
65   %cmp39 = icmp eq i32 %tmp34, %mul38
66   br i1 %cmp39, label %lor.lhs.false, label %if.then84
68 lor.lhs.false:                                    ; preds = %if.end33
69   %tmp40 = load i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 1), align 4
70   %tmp41 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 1), align 4
71   %add42 = add i32 %tmp41, 142
72   %mul44 = mul i32 %add42, %y.addr.0
73   %cmp45 = icmp eq i32 %tmp40, %mul44
74   br i1 %cmp45, label %lor.lhs.false46, label %if.then84
76 lor.lhs.false46:                                  ; preds = %lor.lhs.false
77   %tmp47 = load i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 2), align 8
78   %tmp48 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 2), align 8
79   %add49 = add i32 %tmp48, 2
80   %mul51 = mul i32 %add49, %x.addr.0
81   %cmp52 = icmp eq i32 %tmp47, %mul51
82   br i1 %cmp52, label %lor.lhs.false53, label %if.then84
84 lor.lhs.false53:                                  ; preds = %lor.lhs.false46
85   %tmp54 = load i32* getelementptr inbounds ([16 x i32]* @out, i64 0, i64 3), align 4
86   %tmp55 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 3), align 4
87   %add56 = add i32 %tmp55, 31
88   %mul58 = mul i32 %add56, %y.addr.0
89   %cmp59 = icmp eq i32 %tmp54, %mul58
90   br i1 %cmp59, label %lor.lhs.false60, label %if.then84
92 lor.lhs.false60:                                  ; preds = %lor.lhs.false53
93   %tmp61 = load i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 0), align 16
94   %tmp62 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 0), align 16
95   %sub64 = sub i32 -23, %tmp62
96   %cmp65 = icmp eq i32 %tmp61, %sub64
97   br i1 %cmp65, label %lor.lhs.false66, label %if.then84
99 lor.lhs.false66:                                  ; preds = %lor.lhs.false60
100   %tmp67 = load i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 1), align 4
101   %tmp68 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 1), align 4
102   %sub70 = sub i32 -142, %tmp68
103   %cmp71 = icmp eq i32 %tmp67, %sub70
104   br i1 %cmp71, label %lor.lhs.false72, label %if.then84
106 lor.lhs.false72:                                  ; preds = %lor.lhs.false66
107   %tmp73 = load i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 2), align 8
108   %tmp74 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 2), align 8
109   %sub76 = sub i32 -2, %tmp74
110   %cmp77 = icmp eq i32 %tmp73, %sub76
111   br i1 %cmp77, label %lor.lhs.false78, label %if.then84
113 lor.lhs.false78:                                  ; preds = %lor.lhs.false72
114   %tmp79 = load i32* getelementptr inbounds ([16 x i32]* @b, i64 0, i64 3), align 4
115   %tmp80 = load i32* getelementptr inbounds ([16 x i32]* @in, i64 0, i64 3), align 4
116   %sub82 = sub i32 -31, %tmp80
117   %cmp83 = icmp eq i32 %tmp79, %sub82
118   br i1 %cmp83, label %if.end85, label %if.then84
120 if.then84:                                        ; preds = %lor.lhs.false78, %lor.lhs.false72, %lor.lhs.false66, %lor.lhs.false60, %lor.lhs.false53, %lor.lhs.false46, %lor.lhs.false, %if.end33
121   call void @abort() noreturn nounwind
122   unreachable
124 if.end85:                                         ; preds = %lor.lhs.false78
125   ret i32 0
128 declare void @abort() noreturn
130 define i32 @main() nounwind uwtable {
131 entry:
132   call void @check_vect()
133   %call = call i32 @main1(i32 2, i32 3)
134   ret i32 0
137 define internal void @check_vect() nounwind uwtable noinline {
138 entry:
139   %a = alloca i32, align 4
140   %b = alloca i32, align 4
141   %c = alloca i32, align 4
142   %d = alloca i32, align 4
143   %call = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* @sig_ill_handler) nounwind
144   %call1 = call i32 @__get_cpuid(i32 1, i32* %a, i32* %b, i32* %c, i32* %d)
145   %tobool = icmp eq i32 %call1, 0
146   br i1 %tobool, label %if.then, label %lor.lhs.false
148 lor.lhs.false:                                    ; preds = %entry
149   %tmp4 = load i32* %d, align 4
150   %and6 = and i32 %tmp4, 67108864
151   %cmp = icmp eq i32 %and6, 0
152   br i1 %cmp, label %if.then, label %if.end
154 if.then:                                          ; preds = %entry, %lor.lhs.false
155   call void @exit(i32 0) noreturn nounwind
156   unreachable
158 if.end:                                           ; preds = %lor.lhs.false
159   %call7 = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* null) nounwind
160   ret void
163 declare void (i32)* @signal(i32, void (i32)*) nounwind
165 define internal void @sig_ill_handler(i32 %sig) nounwind uwtable {
166 entry:
167   call void @exit(i32 0) noreturn nounwind
168   unreachable
170 return:                                           ; No predecessors!
171   ret void
174 define internal i32 @__get_cpuid(i32 %__level, i32* %__eax, i32* %__ebx, i32* %__ecx, i32* %__edx) nounwind uwtable inlinehint {
175 entry:
176   %and = and i32 %__level, -2147483648
177   %call = call i32 @__get_cpuid_max(i32 %and, i32* null)
178   %cmp = icmp ult i32 %call, %__level
179   br i1 %cmp, label %if.then, label %if.end
181 if.then:                                          ; preds = %entry
182   br label %return
184 if.end:                                           ; preds = %entry
185   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__level) nounwind, !srcloc !1
186   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
187   %asmresult8 = extractvalue { i32, i32, i32, i32 } %tmp, 1
188   %asmresult9 = extractvalue { i32, i32, i32, i32 } %tmp, 2
189   %asmresult10 = extractvalue { i32, i32, i32, i32 } %tmp, 3
190   store i32 %asmresult, i32* %__eax, align 4
191   store i32 %asmresult8, i32* %__ebx, align 4
192   store i32 %asmresult9, i32* %__ecx, align 4
193   store i32 %asmresult10, i32* %__edx, align 4
194   br label %return
196 return:                                           ; preds = %if.end, %if.then
197   %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.end ]
198   ret i32 %retval.0
201 declare void @exit(i32) noreturn
203 define internal i32 @__get_cpuid_max(i32 %__ext, i32* %__sig) nounwind uwtable inlinehint {
204 entry:
205   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__ext) nounwind, !srcloc !2
206   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
207   %tobool = icmp eq i32* %__sig, null
208   br i1 %tobool, label %if.end, label %if.then
210 if.then:                                          ; preds = %entry
211   %asmresult1 = extractvalue { i32, i32, i32, i32 } %tmp, 1
212   store i32 %asmresult1, i32* %__sig, align 4
213   br label %if.end
215 if.end:                                           ; preds = %entry, %if.then
216   ret i32 %asmresult
219 !0 = metadata !{i32 655}
220 !1 = metadata !{i32 -2147342985, i32 -2147342977} 
221 !2 = metadata !{i32 -2147343108, i32 -2147343100} 
222 ; CHECK: define