forked from OSchip/llvm-project
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
This commit is contained in:
parent
7ceaba8600
commit
13e222ca55
|
@ -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);
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
ISL_HASH="2c19ecd444095d6f560349018f68993bc0e03691"
|
||||
ISL_HASH="b3e0fa7a05d32f1e0e36e0a42b0b83fa2ba1f609"
|
||||
|
||||
PWD=`pwd`
|
||||
|
||||
|
|
Loading…
Reference in New Issue