source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/BasicAA/phi-spec-order.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 3.8 KB
Line 
1target 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-f128:128:128-v128:128:128-n32:64"
2target triple = "powerpc64-bgq-linux"
3; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
4
5@X = external global [16000 x double], align 32
6@Y = external global [16000 x double], align 32
7
8define signext i32 @s000() nounwind {
9entry:
10  br label %for.cond2.preheader
11
12for.cond2.preheader:                              ; preds = %for.end, %entry
13  %nl.018 = phi i32 [ 0, %entry ], [ %inc9, %for.end ]
14  br label %for.body4
15
16for.body4:                                        ; preds = %for.body4, %for.cond2.preheader
17  %lsr.iv4 = phi [16000 x double]* [ %i11, %for.body4 ], [ bitcast (double* getelementptr inbounds ([16000 x double], [16000 x double]* @Y, i64 0, i64 8)
18 to [16000 x double]*), %for.cond2.preheader ]
19  %lsr.iv1 = phi [16000 x double]* [ %i10, %for.body4 ], [ @X, %for.cond2.preheader ]
20
21; CHECK: NoAlias:{{[ \t]+}}[16000 x double]* %lsr.iv1, [16000 x double]* %lsr.iv4
22
23  %lsr.iv = phi i32 [ %lsr.iv.next, %for.body4 ], [ 16000, %for.cond2.preheader ]
24  %lsr.iv46 = bitcast [16000 x double]* %lsr.iv4 to <4 x double>*
25  %lsr.iv12 = bitcast [16000 x double]* %lsr.iv1 to <4 x double>*
26  %scevgep11 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -2
27  %i6 = load <4 x double>, <4 x double>* %scevgep11, align 32
28  %add = fadd <4 x double> %i6, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
29  store <4 x double> %add, <4 x double>* %lsr.iv12, align 32
30  %scevgep10 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -1
31  %i7 = load <4 x double>, <4 x double>* %scevgep10, align 32
32  %add.4 = fadd <4 x double> %i7, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
33  %scevgep9 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 1
34  store <4 x double> %add.4, <4 x double>* %scevgep9, align 32
35  %i8 = load <4 x double>, <4 x double>* %lsr.iv46, align 32
36  %add.8 = fadd <4 x double> %i8, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
37  %scevgep8 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 2
38  store <4 x double> %add.8, <4 x double>* %scevgep8, align 32
39  %scevgep7 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 1
40  %i9 = load <4 x double>, <4 x double>* %scevgep7, align 32
41  %add.12 = fadd <4 x double> %i9, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
42  %scevgep3 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 3
43  store <4 x double> %add.12, <4 x double>* %scevgep3, align 32
44
45; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep11, <4 x double>* %scevgep7
46; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep10, <4 x double>* %scevgep7
47; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep7, <4 x double>* %scevgep9
48; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep11, <4 x double>* %scevgep3
49; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep10, <4 x double>* %scevgep3
50; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep3, <4 x double>* %scevgep9
51
52  %lsr.iv.next = add i32 %lsr.iv, -16
53  %scevgep = getelementptr [16000 x double], [16000 x double]* %lsr.iv1, i64 0, i64 16
54  %i10 = bitcast double* %scevgep to [16000 x double]*
55  %scevgep5 = getelementptr [16000 x double], [16000 x double]* %lsr.iv4, i64 0, i64 16
56  %i11 = bitcast double* %scevgep5 to [16000 x double]*
57  %exitcond.15 = icmp eq i32 %lsr.iv.next, 0
58  br i1 %exitcond.15, label %for.end, label %for.body4
59
60for.end:                                          ; preds = %for.body4
61  %inc9 = add nsw i32 %nl.018, 1
62  %exitcond = icmp eq i32 %inc9, 400000
63  br i1 %exitcond, label %for.end10, label %for.cond2.preheader
64
65for.end10:                                        ; preds = %for.end
66  ret i32 0
67}
Note: See TracBrowser for help on using the repository browser.