From 13e222ca55342c3b480ce264bf3de3f08729afc9 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sun, 7 Dec 2014 16:04:29 +0000 Subject: [PATCH] Update to the latest version of isl Isl now specifically marks modulo operations that are compared against zero. They can be implemented with the C/LLVM remainder operation. We also update a couple of test cases where the output of isl has slightly changed. llvm-svn: 223607 --- polly/lib/CodeGen/IslExprBuilder.cpp | 3 +++ polly/test/Dependences/reduction_privatization_deps_4.ll | 2 +- polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll | 2 +- polly/test/ScopInfo/assume_gep_bounds_2.ll | 2 +- polly/utils/checkout_isl.sh | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/polly/lib/CodeGen/IslExprBuilder.cpp b/polly/lib/CodeGen/IslExprBuilder.cpp index 39a9bb6..1f896fa 100644 --- a/polly/lib/CodeGen/IslExprBuilder.cpp +++ b/polly/lib/CodeGen/IslExprBuilder.cpp @@ -182,6 +182,7 @@ Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) { case isl_ast_op_pdiv_r: case isl_ast_op_div: case isl_ast_op_fdiv_q: + case isl_ast_op_zdiv_r: // Do nothing break; case isl_ast_op_add: @@ -230,6 +231,7 @@ Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) { break; } case isl_ast_op_pdiv_r: // Dividend is non-negative + case isl_ast_op_zdiv_r: // Result only compared against zero Res = Builder.CreateSRem(LHS, RHS); break; } @@ -392,6 +394,7 @@ Value *IslExprBuilder::createOp(__isl_take isl_ast_expr *Expr) { case isl_ast_op_fdiv_q: // Round towards -infty case isl_ast_op_pdiv_q: // Dividend is non-negative case isl_ast_op_pdiv_r: // Dividend is non-negative + case isl_ast_op_zdiv_r: // Result only compared against zero return createOpBin(Expr); case isl_ast_op_minus: return createOpUnary(Expr); diff --git a/polly/test/Dependences/reduction_privatization_deps_4.ll b/polly/test/Dependences/reduction_privatization_deps_4.ll index 5f44815..190bd94 100644 --- a/polly/test/Dependences/reduction_privatization_deps_4.ll +++ b/polly/test/Dependences/reduction_privatization_deps_4.ll @@ -13,7 +13,7 @@ ; CHECK-DAG: Stmt_S2[i0, i0] -> Stmt_S3[i0] : i0 >= 0 and i0 <= 98 ; CHECK-DAG: Stmt_S3[i0] -> Stmt_S2[o0, i0] : i0 >= 0 and o0 >= 1 + i0 and o0 <= 98 ; CHECK: Reduction dependences: -; CHECK-DAG: { Stmt_S2[i0, i1] -> Stmt_S2[1 + i0, i1] : (i0 <= 97 and i1 >= 0 and i1 <= -1 + i0) or (i0 >= 0 and i1 >= 2 + i0 and i1 <= 99) } +; CHECK-DAG: { Stmt_S2[i0, i1] -> Stmt_S2[1 + i0, i1] : (i0 >= 0 and i1 >= 2 + i0 and i1 <= 99) or (i0 <= 97 and i1 >= 0 and i1 <= -1 + i0) } ; ; void f(int *sum) { ; for (int i = 0; i < 99; i++) { diff --git a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll index 708e7fa..8e4d52a 100644 --- a/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll +++ b/polly/test/Isl/Ast/reduction_modulo_schedule_multiple_dimensions_4.ll @@ -7,7 +7,7 @@ ; CHECK: for (int c1 = 0; c1 < 2 * n; c1 += 1) ; CHECK: #pragma simd reduction ; CHECK: for (int c3 = -1023; c3 <= 1023; c3 += 1) { -; CHECK: if (c3 <= 0 && -c3 % 2 == 0) { +; CHECK: if (c3 <= 0 && c3 % 2 == 0) { ; CHECK: Stmt_for_body3(c1, -c3); ; CHECK: } else if (c3 >= 1 && (c3 - 1) % 2 == 0) ; CHECK: Stmt_for_body3(c1, c3); diff --git a/polly/test/ScopInfo/assume_gep_bounds_2.ll b/polly/test/ScopInfo/assume_gep_bounds_2.ll index b7e93be..3c27e53 100644 --- a/polly/test/ScopInfo/assume_gep_bounds_2.ll +++ b/polly/test/ScopInfo/assume_gep_bounds_2.ll @@ -16,7 +16,7 @@ ; accessed. In this case the value of m does not matter. ; CHECK: Assumed Context: -; CHECK-NEXT: [n, m, p] -> { : (n <= 0 and p <= 20) or (m <= 20 and p <= 20) } +; CHECK-NEXT: [n, m, p] -> { : (n >= 1 and m <= 20 and p <= 20) or (n <= 0 and p <= 20) } target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" diff --git a/polly/utils/checkout_isl.sh b/polly/utils/checkout_isl.sh index df2115c..129e9e0 100755 --- a/polly/utils/checkout_isl.sh +++ b/polly/utils/checkout_isl.sh @@ -1,6 +1,6 @@ #!/bin/sh -ISL_HASH="2c19ecd444095d6f560349018f68993bc0e03691" +ISL_HASH="b3e0fa7a05d32f1e0e36e0a42b0b83fa2ba1f609" PWD=`pwd` -- 2.7.4