I encountered a bug when I try to simplify a 64 bits integer TIR expression: floordiv(uint32(floordiv((int64(floordiv(iii, (uint32)1))*(int64)536870912), (int64)4294967296)), (uint32)1) Using arith::Analyzer to “Simplify” this expression will result in floormod 0 error. The cause is that the definition of floormod is PrimExpr(PrimExpr, int) which truncates int64_t to int at here:
Adding int64_t overloading version will solve the problem, but a potential issue is that any existing invocation of this function with uint64_t type will raise complaining of “call of overloadded … is ambiguous”.