From bc543107ea414a4d8aabf2f70a28cdc35f6db350 Mon Sep 17 00:00:00 2001 From: Sergei Grechanik Date: Tue, 15 Oct 2019 18:51:06 +0300 Subject: [PATCH] [ARITH] Fix lowering of floormod(x, y) != 0 (#4127) --- src/pass/lower_intrin.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pass/lower_intrin.cc b/src/pass/lower_intrin.cc index 3935d23cce0c..cc51c6630d92 100644 --- a/src/pass/lower_intrin.cc +++ b/src/pass/lower_intrin.cc @@ -193,7 +193,7 @@ class IntrinInjecter : public arith::IRMutatorWithAnalyzer { using namespace arith; PVar x, y; if ((floormod(x, y) != 0).Match(e)) { - return Mutate((truncmod(x, y) == 0).Eval()); + return Mutate((truncmod(x, y) != 0).Eval()); } return IRMutatorWithAnalyzer::Mutate_(op, e); }