The range infrastructure has code to decompose POLY_INT_CST ranges to worst-case integer bounds. However, it had the fundamental flaw (obvious in hindsight) that it applied to anti-ranges too, meaning that a range 2+2X would end up with a range of ~[2, +INF], i.e. [-INF, 1]. This patch decays to varying in that case instead. I'm still a bit uneasy about this. ISTM that in terms of generality: SSA_NAME => POLY_INT_CST => INTEGER_CST => ADDR_EXPR I.e. an SSA_NAME could store a POLY_INT_CST and a POLY_INT_CST could store an INTEGER_CST (before canonicalisation). POLY_INT_CST is also “as constant as” ADDR_EXPR (well, OK, only some ADDR_EXPRs are run-time rather than link-time constants, whereas all POLY_INT_CSTs are, but still). So it seems like we should at least be able to treat POLY_INT_CST as symbolic. On the other hand, I don't have any examples in which that would be useful. gcc/ PR tree-optimization/96146 * value-range.cc (value_range::set): Only decompose POLY_INT_CST bounds to integers for VR_RANGE. Decay to VR_VARYING for anti-ranges involving POLY_INT_CSTs. gcc/testsuite/ PR tree-optimization/96146 * gcc.target/aarch64/sve/acle/general/pr96146.c: New test.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
aarch64 | Loading commit data... | |
alpha | Loading commit data... | |
arc | Loading commit data... | |
arm | Loading commit data... | |
avr | Loading commit data... | |
bfin | Loading commit data... | |
bpf | Loading commit data... | |
cris | Loading commit data... | |
csky | Loading commit data... | |
epiphany | Loading commit data... | |
frv | Loading commit data... | |
gcn | Loading commit data... | |
h8300 | Loading commit data... | |
hppa | Loading commit data... | |
i386 | Loading commit data... | |
ia64 | Loading commit data... | |
m68k | Loading commit data... | |
microblaze | Loading commit data... | |
mips | Loading commit data... | |
msp430 | Loading commit data... | |
nds32 | Loading commit data... | |
nios2 | Loading commit data... | |
nvptx | Loading commit data... | |
or1k | Loading commit data... | |
powerpc | Loading commit data... | |
pru | Loading commit data... | |
riscv | Loading commit data... | |
rl78 | Loading commit data... | |
rx | Loading commit data... | |
s390 | Loading commit data... | |
sh | Loading commit data... | |
sparc | Loading commit data... | |
tic6x | Loading commit data... | |
vax | Loading commit data... | |
visium | Loading commit data... | |
x86_64/abi | Loading commit data... | |
xstormy16 | Loading commit data... | |
xtensa | Loading commit data... |