aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorAbderrazek Zaafrani <a.zaafrani@samsung.com>2016-01-26 22:02:11 +0000
committerSebastian Pop <spop@gcc.gnu.org>2016-01-26 22:02:11 +0000
commit56f80f54fea87fd139fc3e8637eb86fd1f886380 (patch)
tree638f5ac175067ff03b306bcc14f058b3bdc7451b /gcc/testsuite
parenta0909527ea43a796239cd68c7354a3a4447852b7 (diff)
downloadgcc-56f80f54fea87fd139fc3e8637eb86fd1f886380.zip
gcc-56f80f54fea87fd139fc3e8637eb86fd1f886380.tar.gz
gcc-56f80f54fea87fd139fc3e8637eb86fd1f886380.tar.bz2
handle isl_ast_op_select
2016-01-26 Abderrazek Zaafrani <a.zaafrani@samsung.com> Sebastian Pop <s.pop@samsung.com> * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Handle isl_ast_op_cond and isl_ast_op_select. (gcc_expression_from_isl_expr_op): Same. * gcc.dg/graphite/isl-ast-op-select.c: New. Co-Authored-By: Sebastian Pop <s.pop@samsung.com> From-SVN: r232851
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c29
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a35d295..ee59ff1 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-26 Abderrazek Zaafrani <a.zaafrani@samsung.com>
+ Sebastian Pop <s.pop@samsung.com>
+
+ * gcc.dg/graphite/isl-ast-op-select.c: New.
+
2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/69385
diff --git a/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c b/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c
new file mode 100644
index 0000000..688176e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/isl-ast-op-select.c
@@ -0,0 +1,29 @@
+/* { dg-options "-O2 -floop-nest-optimize" } */
+
+static void kernel_gemm(int ni, int nj, int nk, double alpha, double beta, double C[1024][1024], double A[1024][1024], double B[1024][1024])
+{
+ int i, j, k;
+ for (i = 0; i < ni; i++)
+ for (j = 0; j < nj; j++)
+ {
+ C[i][j] *= beta;
+ for (k = 0; k < nk; ++k)
+ C[i][j] += alpha * A[i][k] * B[k][j];
+ }
+}
+
+void *polybench_alloc_data (int, int);
+
+int main(int argc, char** argv) {
+ int ni = 1024;
+ int nj = 1024;
+ int nk = 1024;
+ double alpha;
+ double beta;
+ double (*C)[1024][1024];
+ C = (double(*)[1024][1024])polybench_alloc_data ((1024) * (1024), sizeof(double));
+ double (*A)[1024][1024];
+ A = (double(*)[1024][1024])polybench_alloc_data ((1024) * (1024), sizeof(double));
+ double (*B)[1024][1024];
+ kernel_gemm (ni, nj, nk, alpha, beta, *C, *A, *B);
+}