Add compile command to each testcase
[gcc-vect-testsuite.git] / bb-slp-19.ll
blobaad4cf03be1cbb76e463d76b6d79901932e635ea
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-19.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer bb-slp-19.s > bb-slp-19.ll
6 ; ModuleID = 'bb-slp-19.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 i16] [i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15], align 16
11 @out = common global [16 x i16] zeroinitializer, align 16
12 @i = common global i32 0, align 4
14 define i32 @main1() nounwind uwtable noinline {
15 entry:
16   %tmp1 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 0), align 16
17   store i16 %tmp1, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 0), align 16
18   %tmp6 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 1), align 2
19   store i16 %tmp6, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 1), align 2
20   %tmp11 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 2), align 4
21   store i16 %tmp11, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 2), align 4
22   %tmp16 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 3), align 2
23   store i16 %tmp16, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 3), align 2
24   %tmp21 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 4), align 8
25   store i16 %tmp21, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 4), align 8
26   %tmp26 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 5), align 2
27   store i16 %tmp26, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 5), align 2
28   %tmp31 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 6), align 4
29   store i16 %tmp31, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 6), align 4
30   %tmp36 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 7), align 2
31   store i16 %tmp36, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 7), align 2
32   %tmp41 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 8), align 16
33   store i16 %tmp41, i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 8), align 16
34   %tmp44 = load i32* @i, align 4
35   %tobool = icmp eq i32 %tmp44, 0
36   br i1 %tobool, label %if.end, label %if.then
38 if.then:                                          ; preds = %entry
39   call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0
40   br label %if.end
42 if.end:                                           ; preds = %entry, %if.then
43   %tmp45 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 0), align 16
44   %tmp46 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 0), align 16
45   %cmp = icmp eq i16 %tmp45, %tmp46
46   br i1 %cmp, label %lor.lhs.false, label %if.then104
48 lor.lhs.false:                                    ; preds = %if.end
49   %tmp49 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 1), align 2
50   %tmp51 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 1), align 2
51   %cmp53 = icmp eq i16 %tmp49, %tmp51
52   br i1 %cmp53, label %lor.lhs.false55, label %if.then104
54 lor.lhs.false55:                                  ; preds = %lor.lhs.false
55   %tmp56 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 2), align 4
56   %tmp58 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 2), align 4
57   %cmp60 = icmp eq i16 %tmp56, %tmp58
58   br i1 %cmp60, label %lor.lhs.false62, label %if.then104
60 lor.lhs.false62:                                  ; preds = %lor.lhs.false55
61   %tmp63 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 3), align 2
62   %tmp65 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 3), align 2
63   %cmp67 = icmp eq i16 %tmp63, %tmp65
64   br i1 %cmp67, label %lor.lhs.false69, label %if.then104
66 lor.lhs.false69:                                  ; preds = %lor.lhs.false62
67   %tmp70 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 4), align 8
68   %tmp72 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 4), align 8
69   %cmp74 = icmp eq i16 %tmp70, %tmp72
70   br i1 %cmp74, label %lor.lhs.false76, label %if.then104
72 lor.lhs.false76:                                  ; preds = %lor.lhs.false69
73   %tmp77 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 5), align 2
74   %tmp79 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 5), align 2
75   %cmp81 = icmp eq i16 %tmp77, %tmp79
76   br i1 %cmp81, label %lor.lhs.false83, label %if.then104
78 lor.lhs.false83:                                  ; preds = %lor.lhs.false76
79   %tmp84 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 6), align 4
80   %tmp86 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 6), align 4
81   %cmp88 = icmp eq i16 %tmp84, %tmp86
82   br i1 %cmp88, label %lor.lhs.false90, label %if.then104
84 lor.lhs.false90:                                  ; preds = %lor.lhs.false83
85   %tmp91 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 7), align 2
86   %tmp93 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 7), align 2
87   %cmp95 = icmp eq i16 %tmp91, %tmp93
88   br i1 %cmp95, label %lor.lhs.false97, label %if.then104
90 lor.lhs.false97:                                  ; preds = %lor.lhs.false90
91   %tmp98 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 8), align 16
92   %tmp100 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 8), align 16
93   %cmp102 = icmp eq i16 %tmp98, %tmp100
94   br i1 %cmp102, label %if.end105, label %if.then104
96 if.then104:                                       ; preds = %lor.lhs.false97, %lor.lhs.false90, %lor.lhs.false83, %lor.lhs.false76, %lor.lhs.false69, %lor.lhs.false62, %lor.lhs.false55, %lor.lhs.false, %if.end
97   call void @abort() noreturn nounwind
98   unreachable
100 if.end105:                                        ; preds = %lor.lhs.false97
101   ret i32 0
104 declare void @abort() noreturn
106 define i32 @main() nounwind uwtable {
107 entry:
108   call void @check_vect()
109   %call = call i32 @main1()
110   ret i32 0
113 define internal void @check_vect() nounwind uwtable noinline {
114 entry:
115   %a = alloca i32, align 4
116   %b = alloca i32, align 4
117   %c = alloca i32, align 4
118   %d = alloca i32, align 4
119   %call = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* @sig_ill_handler) nounwind
120   %call1 = call i32 @__get_cpuid(i32 1, i32* %a, i32* %b, i32* %c, i32* %d)
121   %tobool = icmp eq i32 %call1, 0
122   br i1 %tobool, label %if.then, label %lor.lhs.false
124 lor.lhs.false:                                    ; preds = %entry
125   %tmp4 = load i32* %d, align 4
126   %and6 = and i32 %tmp4, 67108864
127   %cmp = icmp eq i32 %and6, 0
128   br i1 %cmp, label %if.then, label %if.end
130 if.then:                                          ; preds = %entry, %lor.lhs.false
131   call void @exit(i32 0) noreturn nounwind
132   unreachable
134 if.end:                                           ; preds = %lor.lhs.false
135   %call7 = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* null) nounwind
136   ret void
139 declare void (i32)* @signal(i32, void (i32)*) nounwind
141 define internal void @sig_ill_handler(i32 %sig) nounwind uwtable {
142 entry:
143   call void @exit(i32 0) noreturn nounwind
144   unreachable
146 return:                                           ; No predecessors!
147   ret void
150 define internal i32 @__get_cpuid(i32 %__level, i32* %__eax, i32* %__ebx, i32* %__ecx, i32* %__edx) nounwind uwtable inlinehint {
151 entry:
152   %and = and i32 %__level, -2147483648
153   %call = call i32 @__get_cpuid_max(i32 %and, i32* null)
154   %cmp = icmp ult i32 %call, %__level
155   br i1 %cmp, label %if.then, label %if.end
157 if.then:                                          ; preds = %entry
158   br label %return
160 if.end:                                           ; preds = %entry
161   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__level) nounwind, !srcloc !1
162   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
163   %asmresult8 = extractvalue { i32, i32, i32, i32 } %tmp, 1
164   %asmresult9 = extractvalue { i32, i32, i32, i32 } %tmp, 2
165   %asmresult10 = extractvalue { i32, i32, i32, i32 } %tmp, 3
166   store i32 %asmresult, i32* %__eax, align 4
167   store i32 %asmresult8, i32* %__ebx, align 4
168   store i32 %asmresult9, i32* %__ecx, align 4
169   store i32 %asmresult10, i32* %__edx, align 4
170   br label %return
172 return:                                           ; preds = %if.end, %if.then
173   %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.end ]
174   ret i32 %retval.0
177 declare void @exit(i32) noreturn
179 define internal i32 @__get_cpuid_max(i32 %__ext, i32* %__sig) nounwind uwtable inlinehint {
180 entry:
181   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__ext) nounwind, !srcloc !2
182   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
183   %tobool = icmp eq i32* %__sig, null
184   br i1 %tobool, label %if.end, label %if.then
186 if.then:                                          ; preds = %entry
187   %asmresult1 = extractvalue { i32, i32, i32, i32 } %tmp, 1
188   store i32 %asmresult1, i32* %__sig, align 4
189   br label %if.end
191 if.end:                                           ; preds = %entry, %if.then
192   ret i32 %asmresult
195 !0 = metadata !{i32 578}
196 !1 = metadata !{i32 -2147343230, i32 -2147343222} 
197 !2 = metadata !{i32 -2147343353, i32 -2147343345} 
198 ; CHECK: define