Re: [PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Aldy Hernandez via Gcc-patches
On PTO until Monday but thinking out loud here Shouldn't we put this code in set_nonzero_bits instead, and leave maybe* alone? That way any possible setters may benefit from your change? Also, havent looked (AFK) but does this change work with the global range getter (get_global_range_query..

Re: [PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Aldy Hernandez via Gcc-patches
OK. On Wed, Jan 4, 2023, 10:13 Jakub Jelinek wrote: > Hi! > > maybe_set_nonzero_bits calls set_nonzero_bits which asserts that > var doesn't have pointer type. While we could punt for those > cases, I think we can handle at least some easy cases. > Earlier in maybe_set_nonzero_bits we've checke

[PATCH] vrp: Handle pointers in maybe_set_nonzero_bits [PR108253]

2023-01-04 Thread Jakub Jelinek via Gcc-patches
Hi! maybe_set_nonzero_bits calls set_nonzero_bits which asserts that var doesn't have pointer type. While we could punt for those cases, I think we can handle at least some easy cases. Earlier in maybe_set_nonzero_bits we've checked this is on (var & cst) == 0 edge and the other edge is __builtin