halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.78k stars 1.07k forks source link

Rework the simplifier to use ConstantInterval for bounds #8222

Closed abadams closed 1 month ago

abadams commented 1 month ago

Now that ConstantInterval is more powerful, this PR reworks the simplifier to use it for bounds information. This is not quite just a refactor PR, because it also tracks bounds for many more types, resulting in better simplification of e.g. fixed-point expressions.

I also moved the simplify fuzzer back to being a correctness test (see #8171)

Also includes bug-fixes #8220 and #8221, because those would otherwise break this PR. There are no files in common, so if you want to review before those are merged, just ignore the associativity and modulus remainder changes.

abadams commented 1 month ago

Failures unrelated. Merging.