On Tue, Dec 30, 2025 at 03:08:06AM -0800, Vimal Patel wrote:
> Hi all,
>
> When computing a bounding box of `isl_set` using
> `isl_set_get_simple_fixed_box_hull`, the bounding box is larger than
> expected. This is the original set:
> [p0, p1] -> { C0[i0, i1, i2] : exists (e0 = floor((-p0 + i1)/32): 32e0 =
> -p0 + i1 and p0 >= 0 and p0 <= 255 and p1 >= 0 and p1 <= 15 and 32i0 >= -31
> + p0 and 32i0 <= p0 and i1 >= 0 and i1 <= 31 and i2 >= 64p1 and i2 <= 63 +
> 64p1) }
> and the bounding box returned by `isl_set_get_simple_fixed_box_hull`:
> offset: "[p0, p1] -> { C0[(floor((p0)/32)), (0), (64p1)] }" size: "{ C0[1,
> 32, 64] }"
>
> But the second dimension of the offset and size of the bounding box could
> have been `p0 mod 32` and 1, respectively.
> Is this over-approximation expected?
Based on the current implementation in master, yes.
I have some improvements locally. I'll try and extract them.
skimo