Update Polly tests to handle explicitly typed gep changes in LLVM
[polly-mirror.git] / test / Dependences / do_pluto_matmult.ll
blob80de02d8c7e50eb49f253fdcf5196cdf1c57fbd6
1 ; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-dependences -analyze -polly-dependences-analysis-type=value-based < %s | FileCheck %s -check-prefix=VALUE
2 ; RUN: opt %loadPolly -polly-detect-unprofitable -basicaa -polly-dependences -analyze -polly-dependences-analysis-type=memory-based -polly-delinearize < %s | FileCheck %s -check-prefix=MEMORY
4 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"
5 target triple = "x86_64-unknown-linux-gnu"
7 %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
8 %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
10 @A = common global [36 x [49 x double]] zeroinitializer, align 8 ; <[36 x [49 x double]]*> [#uses=3]
11 @B = common global [36 x [49 x double]] zeroinitializer, align 8 ; <[36 x [49 x double]]*> [#uses=3]
12 @C = common global [36 x [49 x double]] zeroinitializer, align 8 ; <[36 x [49 x double]]*> [#uses=4]
14 define void @do_pluto_matmult() nounwind {
15 entry:
16   fence seq_cst
17   br label %do.body
19 do.body:                                          ; preds = %do.cond42, %entry
20   %indvar3 = phi i64 [ %indvar.next4, %do.cond42 ], [ 0, %entry ] ; <i64> [#uses=3]
21   br label %do.body1
23 do.body1:                                         ; preds = %do.cond36, %do.body
24   %indvar1 = phi i64 [ %indvar.next2, %do.cond36 ], [ 0, %do.body ] ; <i64> [#uses=3]
25   %arrayidx5 = getelementptr [36 x [49 x double]], [36 x [49 x double]]* @C, i64 0, i64 %indvar3, i64 %indvar1 ; <double*> [#uses=2]
26   br label %do.body2
28 do.body2:                                         ; preds = %do.cond, %do.body1
29   %indvar = phi i64 [ %indvar.next, %do.cond ], [ 0, %do.body1 ] ; <i64> [#uses=3]
30   %arrayidx13 = getelementptr [36 x [49 x double]], [36 x [49 x double]]* @A, i64 0, i64 %indvar3, i64 %indvar ; <double*> [#uses=1]
31   %arrayidx22 = getelementptr [36 x [49 x double]], [36 x [49 x double]]* @B, i64 0, i64 %indvar, i64 %indvar1 ; <double*> [#uses=1]
32   %tmp6 = load double* %arrayidx5                 ; <double> [#uses=1]
33   %mul = fmul double 1.000000e+00, %tmp6          ; <double> [#uses=1]
34   %tmp14 = load double* %arrayidx13               ; <double> [#uses=1]
35   %mul15 = fmul double 1.000000e+00, %tmp14       ; <double> [#uses=1]
36   %tmp23 = load double* %arrayidx22               ; <double> [#uses=1]
37   %mul24 = fmul double %mul15, %tmp23             ; <double> [#uses=1]
38   %add = fadd double %mul, %mul24                 ; <double> [#uses=1]
39   store double %add, double* %arrayidx5
40   br label %do.cond
42 do.cond:                                          ; preds = %do.body2
43   %indvar.next = add i64 %indvar, 1               ; <i64> [#uses=2]
44   %exitcond = icmp ne i64 %indvar.next, 36        ; <i1> [#uses=1]
45   br i1 %exitcond, label %do.body2, label %do.end
47 do.end:                                           ; preds = %do.cond
48   br label %do.cond36
50 do.cond36:                                        ; preds = %do.end
51   %indvar.next2 = add i64 %indvar1, 1             ; <i64> [#uses=2]
52   %exitcond5 = icmp ne i64 %indvar.next2, 36      ; <i1> [#uses=1]
53   br i1 %exitcond5, label %do.body1, label %do.end39
55 do.end39:                                         ; preds = %do.cond36
56   br label %do.cond42
58 do.cond42:                                        ; preds = %do.end39
59   %indvar.next4 = add i64 %indvar3, 1             ; <i64> [#uses=2]
60   %exitcond6 = icmp ne i64 %indvar.next4, 36      ; <i1> [#uses=1]
61   br i1 %exitcond6, label %do.body, label %do.end45
63 do.end45:                                         ; preds = %do.cond42
64   fence seq_cst
65   ret void
68 ; VALUE: RAW dependences:
69 ; VALUE: { Stmt_do_body2[i0, i1, i2] -> Stmt_do_body2[i0, i1, 1 + i2] : i0 >= 0 and i0 <= 35 and i1 >= 0 and i1 <= 35 and i2 >= 0 and i2 <= 34 }
70 ; VALUE: WAR dependences:
71 ; VALUE: {  }
72 ; VALUE: WAW dependences:
73 ; VALUE: { Stmt_do_body2[i0, i1, i2] -> Stmt_do_body2[i0, i1, 1 + i2] : i0 <= 35 and i0 >= 0 and i1 <= 35 and i1 >= 0 and i2 <= 34 and i2 >= 0 }
76 ; MEMORY: RAW dependences:
77 ; MEMORY:  { Stmt_do_body2[i0, i1, i2] -> Stmt_do_body2[i0, i1, o2] : i0 <= 35 and i0 >= 0 and i1 <= 35 and i1 >= 0 and i2 >= 0 and o2 >= 1 + i2 and o2 <= 35 and o2 >= 0 }
78 ; MEMORY: WAR dependences:
79 ; MEMORY:  { Stmt_do_body2[i0, i1, i2] -> Stmt_do_body2[i0, i1, o2] : i0 <= 35 and i0 >= 0 and i1 <= 35 and i1 >= 0 and i2 >= 0 and o2 >= 1 + i2 and o2 <= 35 and o2 >= 0 }
80 ; MEMORY: WAW dependences:
81 ; MEMORY:  { Stmt_do_body2[i0, i1, i2] -> Stmt_do_body2[i0, i1, o2] : i0 <= 35 and i0 >= 0 and i1 <= 35 and i1 >= 0 and i2 >= 0 and o2 >= 1 + i2 and o2 <= 35 and o2 >= 0 }