From d6804419e6bed57e1ab5aa29cfc294b169d5fb94 Mon Sep 17 00:00:00 2001 From: Sergei Grechanik Date: Tue, 15 Oct 2019 13:00:54 +0300 Subject: [PATCH] [ARITH] Fix lowering of floormod(x, y) != 0 --- 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); }