Add compile command to each testcase
[gcc-vect-testsuite.git] / bb-slp-4.ll
blob8452fba9bf4fa5de9223b98c65bcca199fc454f4
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-4.c
4 ; opt -correlated-propagation -mem2reg -instcombine -loop-simplify -indvars -instnamer bb-slp-4.s > bb-slp-4.ll
6 ; ModuleID = 'bb-slp-4.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   %tmp9 = load i32* @i, align 4
21   %tobool = icmp eq i32 %tmp9, 0
22   br i1 %tobool, label %if.end, label %if.then
24 if.then:                                          ; preds = %entry
25   call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"() nounwind, !srcloc !0
26   br label %if.end
28 if.end:                                           ; preds = %entry, %if.then
29   %tmp10 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 0), align 16
30   %tmp11 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 0), align 16
31   %cmp = icmp eq i16 %tmp10, %tmp11
32   br i1 %cmp, label %lor.lhs.false, label %if.then20
34 lor.lhs.false:                                    ; preds = %if.end
35   %tmp14 = load i16* getelementptr inbounds ([16 x i16]* @out, i64 0, i64 1), align 2
36   %tmp16 = load i16* getelementptr inbounds ([16 x i16]* @in, i64 0, i64 1), align 2
37   %cmp18 = icmp eq i16 %tmp14, %tmp16
38   br i1 %cmp18, label %if.end21, label %if.then20
40 if.then20:                                        ; preds = %lor.lhs.false, %if.end
41   call void @abort() noreturn nounwind
42   unreachable
44 if.end21:                                         ; preds = %lor.lhs.false
45   ret i32 0
48 declare void @abort() noreturn
50 define i32 @main() nounwind uwtable {
51 entry:
52   call void @check_vect()
53   %call = call i32 @main1()
54   ret i32 0
57 define internal void @check_vect() nounwind uwtable noinline {
58 entry:
59   %a = alloca i32, align 4
60   %b = alloca i32, align 4
61   %c = alloca i32, align 4
62   %d = alloca i32, align 4
63   %call = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* @sig_ill_handler) nounwind
64   %call1 = call i32 @__get_cpuid(i32 1, i32* %a, i32* %b, i32* %c, i32* %d)
65   %tobool = icmp eq i32 %call1, 0
66   br i1 %tobool, label %if.then, label %lor.lhs.false
68 lor.lhs.false:                                    ; preds = %entry
69   %tmp4 = load i32* %d, align 4
70   %and6 = and i32 %tmp4, 67108864
71   %cmp = icmp eq i32 %and6, 0
72   br i1 %cmp, label %if.then, label %if.end
74 if.then:                                          ; preds = %entry, %lor.lhs.false
75   call void @exit(i32 0) noreturn nounwind
76   unreachable
78 if.end:                                           ; preds = %lor.lhs.false
79   %call7 = call void (i32)* (i32, void (i32)*)* @signal(i32 4, void (i32)* null) nounwind
80   ret void
83 declare void (i32)* @signal(i32, void (i32)*) nounwind
85 define internal void @sig_ill_handler(i32 %sig) nounwind uwtable {
86 entry:
87   call void @exit(i32 0) noreturn nounwind
88   unreachable
90 return:                                           ; No predecessors!
91   ret void
94 define internal i32 @__get_cpuid(i32 %__level, i32* %__eax, i32* %__ebx, i32* %__ecx, i32* %__edx) nounwind uwtable inlinehint {
95 entry:
96   %and = and i32 %__level, -2147483648
97   %call = call i32 @__get_cpuid_max(i32 %and, i32* null)
98   %cmp = icmp ult i32 %call, %__level
99   br i1 %cmp, label %if.then, label %if.end
101 if.then:                                          ; preds = %entry
102   br label %return
104 if.end:                                           ; preds = %entry
105   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__level) nounwind, !srcloc !1
106   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
107   %asmresult8 = extractvalue { i32, i32, i32, i32 } %tmp, 1
108   %asmresult9 = extractvalue { i32, i32, i32, i32 } %tmp, 2
109   %asmresult10 = extractvalue { i32, i32, i32, i32 } %tmp, 3
110   store i32 %asmresult, i32* %__eax, align 4
111   store i32 %asmresult8, i32* %__ebx, align 4
112   store i32 %asmresult9, i32* %__ecx, align 4
113   store i32 %asmresult10, i32* %__edx, align 4
114   br label %return
116 return:                                           ; preds = %if.end, %if.then
117   %retval.0 = phi i32 [ 0, %if.then ], [ 1, %if.end ]
118   ret i32 %retval.0
121 declare void @exit(i32) noreturn
123 define internal i32 @__get_cpuid_max(i32 %__ext, i32* %__sig) nounwind uwtable inlinehint {
124 entry:
125   %tmp = call { i32, i32, i32, i32 } asm "cpuid\0A\09", "={ax},={bx},={cx},={dx},0,~{dirflag},~{fpsr},~{flags}"(i32 %__ext) nounwind, !srcloc !2
126   %asmresult = extractvalue { i32, i32, i32, i32 } %tmp, 0
127   %tobool = icmp eq i32* %__sig, null
128   br i1 %tobool, label %if.end, label %if.then
130 if.then:                                          ; preds = %entry
131   %asmresult1 = extractvalue { i32, i32, i32, i32 } %tmp, 1
132   store i32 %asmresult1, i32* %__sig, align 4
133   br label %if.end
135 if.end:                                           ; preds = %entry, %if.then
136   ret i32 %asmresult
139 !0 = metadata !{i32 387}
140 !1 = metadata !{i32 -2147343614, i32 -2147343606} 
141 !2 = metadata !{i32 -2147343737, i32 -2147343729} 
142 ; CHECK: define