Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-11 Thread Jeff Law
On 3/11/24 1:46 AM, Richard Biener wrote: On Sun, Mar 10, 2024 at 10:09 PM Jeff Law wrote: On 3/10/24 3:05 PM, Andrew Pinski wrote: On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false positive triggered by loop

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-11 Thread Richard Biener
On Mon, Mar 11, 2024 at 8:46 AM Richard Biener wrote: > > On Sun, Mar 10, 2024 at 10:09 PM Jeff Law wrote: > > > > > > > > On 3/10/24 3:05 PM, Andrew Pinski wrote: > > > On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > > >> > > >> Here's a potential approach to fixing PR92539, a P2

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-11 Thread Richard Biener
On Sun, Mar 10, 2024 at 10:09 PM Jeff Law wrote: > > > > On 3/10/24 3:05 PM, Andrew Pinski wrote: > > On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > >> > >> Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false > >> positive triggered by loop unrolling. > >> > >> As I

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-10 Thread Andrew Pinski
On Sun, Mar 10, 2024 at 2:09 PM Jeff Law wrote: > > > > On 3/10/24 3:05 PM, Andrew Pinski wrote: > > On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > >> > >> Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false > >> positive triggered by loop unrolling. > >> > >> As I

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-10 Thread Jeff Law
On 3/10/24 3:05 PM, Andrew Pinski wrote: On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false positive triggered by loop unrolling. As I speculated a couple years ago, we could eliminate the comparisons against bogus

Re: [RFC] [PR tree-optimization/92539] Optimize away tests against invalid pointers

2024-03-10 Thread Andrew Pinski
On Sun, Mar 10, 2024 at 2:04 PM Jeff Law wrote: > > Here's a potential approach to fixing PR92539, a P2 -Warray-bounds false > positive triggered by loop unrolling. > > As I speculated a couple years ago, we could eliminate the comparisons > against bogus pointers. Consider: > > >[local