Thanks for having a look I wanted to submit this before going on
travel which is the same reason why I could not immediately respond. I
think I mischaracterized the problem, treating the set before and
after the gist a equivalent. Here is another attempt (new reproducer
attached)
$ gcc isltrace-detecteq.c -I ~/src/isl/include/ ~/src/isl/libisl.a
-lgmp -o isltrace-crash
$ ./isltrace-crash
### ISL version : isl-0.27-368-g88970f3d-GMP-cmake
### at generation: isl-0.27-89-gdc16f8e3-IMath-32
[p_0] -> { MemRef0[i0] : (exists (e0 = floor((-1 - p_0)/8), e1 =
floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 56 and i0 >= 0 and
8e0 >= -8 - p_0 and 8e0 <= -5 - p_0)) or (exists (e0 = floor((3 -
p_0)/8), e1 = floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 88
and i0 >= 32 and 8e0 >= -4 - p_0 and 8e0 < -p_0)) }
[p_0] -> { MemRef0[i0] : (exists (e0 = floor((-1 - p_0)/8), e1 =
floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 56 and i0 >= 0 and
8e0 >= -8 - p_0 and 8e0 <= -5 - p_0)) or (exists (e0 = floor((3 -
p_0)/8), e1 = floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 88
and i0 >= 32 and 8e0 >= -4 - p_0 and 8e0 < -p_0)) }
Crash expected here:
isl_aff.c:5204: map is not single-valued
Aborted (core dumped)
$ gcc isltrace-detecteq.c -I ~/src/isl/include/ ~/src/isl/libisl.a
-lgmp -DDONT_CRASH -o isltrace-pass
$ ./isltrace-pass
### ISL version : isl-0.27-368-g88970f3d-GMP-cmake
### at generation: isl-0.27-89-gdc16f8e3-IMath-32
[p_0] -> { MemRef0[i0] : (exists (e0 = floor((-1 - p_0)/8), e1 =
floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 56 and i0 >= 0 and
8e0 >= -8 - p_0 and 8e0 <= -5 - p_0)) or (exists (e0 = floor((3 -
p_0)/8), e1 = floor((-8p_0 + i0)/64): 64e1 = -8p_0 + i0 and i0 <= 88
and i0 >= 32 and 8e0 >= -4 - p_0 and 8e0 < -p_0)) }
[p_0] -> { MemRef0[i0] : (exists (e0 = floor((-8p_0 + i0)/64): 64e0 =
-8p_0 + i0 and i0 <= 24 and i0 >= 0)) or (exists (e0 = floor((-8p_0 +
i0)/64): 64e0 = -8p_0 + i0 and i0 <= 56 and i0 >= 32)) }
Crash expected here:
Not crashed?
With -DDONT_CRASH, there is another call of isl_set_detect_equalities
on a copy of set479 and immediately discarded. Because it works on a
copy, it should not affect the result of anything else. Yet, it seems
to affect the result of isl_set_gist_params using set479.
Regarding the crash itself, I now think Polly is at fault: It must not
assume that a single-valued set is still single-valued after a gist
operation, which it might not be outside the context. It should apply
isl_multi_pw_aff_gist_params after isl_pw_multi_aff_from_set, not
before. However, it seems weird that the gist operation becomes *less*
powerful with detect_equalities applied (it just returns the original
set).
Michael
Am Mo., 6. Apr. 2026 um 15:24 Uhr schrieb 'Sven Verdoolaege' via isl
Development <
isl-dev...@googlegroups.com>:
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "isl Development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
isl-developme...@googlegroups.com.
> To view this discussion visit
https://groups.google.com/d/msgid/isl-development/20260406132357.GP31921MdfPADPa%40purples.home.
--
Tardyzentrismus verboten!