Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit c2b77b7

Browse files
committed
fix a segfault in halide2isl conversion for mod operation
1 parent fe6fadf commit c2b77b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tc/core/halide2isl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ std::vector<isl::aff> makeIslAffBoundsFromExpr(
201201
std::vector<isl::aff> result;
202202
// We cannot span multiple constraints if a modulo operation is involved.
203203
// x > max(a,b) % C is not equivalent to (x > a % C && x > b % C).
204-
auto lhs = makeIslAffBoundsFromExpr(space, e, false, false);
204+
auto lhs = makeIslAffBoundsFromExpr(space, op->a, false, false);
205205
CHECK_EQ(lhs.size(), 1u);
206206
if (const int64_t* b = as_const_int(op->b)) {
207207
return {lhs[0].mod(isl::val(space.get_ctx(), *b))};

0 commit comments

Comments
 (0)