Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-07-13 Thread Martin Uecker via Gcc
Am Montag, dem 01.07.2024 um 15:19 +0200 schrieb Matthias Kretz: > On Sunday, 30 June 2024 08:33:35 GMT+2 Martin Uecker wrote: > > Am Sonntag, dem 30.06.2024 um 05:03 +0200 schrieb Matthias Kretz: > > > On Saturday, 29 June 2024 16:20:55 GMT+2 Martin Uecker wrote: > > > > Am Samstag, dem 29.06.2024

Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-07-01 Thread Matthias Kretz via Gcc
On Sunday, 30 June 2024 08:33:35 GMT+2 Martin Uecker wrote: > Am Sonntag, dem 30.06.2024 um 05:03 +0200 schrieb Matthias Kretz: > > On Saturday, 29 June 2024 16:20:55 GMT+2 Martin Uecker wrote: > > > Am Samstag, dem 29.06.2024 um 08:50 -0500 schrieb Matthias Kretz via Gcc: > > > > I.e. once UB bec

Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-06-29 Thread Martin Uecker via Gcc
Actually, it is very much aligned with what I want in C. In general I want to have pragma-based compilation modes for memory safety: https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3211.pdf (Bjarne Stroustrup has a proposal for profiles in C++ which goes in similar direction I think) >From a

Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-06-29 Thread Martin Uecker via Gcc
Am Sonntag, dem 30.06.2024 um 05:03 +0200 schrieb Matthias Kretz: > On Saturday, 29 June 2024 16:20:55 GMT+2 Martin Uecker wrote: > > Am Samstag, dem 29.06.2024 um 08:50 -0500 schrieb Matthias Kretz via Gcc: > > > I.e. once UB becomes IFNDR, the dreaded time-travel optimizations can't > > > happen

Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-06-29 Thread Matthias Kretz via Gcc
On Saturday, 29 June 2024 16:20:55 GMT+2 Martin Uecker wrote: > Am Samstag, dem 29.06.2024 um 08:50 -0500 schrieb Matthias Kretz via Gcc: > > I.e. once UB becomes IFNDR, the dreaded time-travel optimizations can't > > happen anymore. Instead precondition checks bubble up because otherwise > > the p

Re: IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-06-29 Thread Martin Uecker via Gcc
Am Samstag, dem 29.06.2024 um 08:50 -0500 schrieb Matthias Kretz via Gcc: ... > I.e. once UB becomes IFNDR, the dreaded time-travel optimizations can't > happen > anymore. Instead precondition checks bubble up because otherwise the program > is ill-formed. It is not clear to mean what you mea

IFNDR on UB? [was: Straw poll on shifts with out of range operands]

2024-06-29 Thread Matthias Kretz via Gcc
On Tuesday, 25 June 2024 21:44:15 CDT Andrew Pinski via Gcc wrote: > I am in the middle of improving the isolation path pass for shifts > with out of range operands. > There are 3 options we could do really: > 1) isolate the path to __builtin_unreachable > 2) isolate the path to __builtin_trap >

Re: Straw poll on shifts with out of range operands

2024-06-25 Thread Richard Biener via Gcc
On Wed, Jun 26, 2024 at 4:59 AM Jeff Law via Gcc wrote: > > > > On 6/25/24 8:44 PM, Andrew Pinski via Gcc wrote: > > I am in the middle of improving the isolation path pass for shifts > > with out of range operands. > > There are 3 options we could do really: > > 1) isolate the path to __builtin_u

Re: Straw poll on shifts with out of range operands

2024-06-25 Thread Jeff Law via Gcc
On 6/25/24 8:44 PM, Andrew Pinski via Gcc wrote: I am in the middle of improving the isolation path pass for shifts with out of range operands. There are 3 options we could do really: 1) isolate the path to __builtin_unreachable 2) isolate the path to __builtin_trap This is what is curren

Straw poll on shifts with out of range operands

2024-06-25 Thread Andrew Pinski via Gcc
I am in the middle of improving the isolation path pass for shifts with out of range operands. There are 3 options we could do really: 1) isolate the path to __builtin_unreachable 2) isolate the path to __builtin_trap This is what is currently done for null pointer and divide by zero 3) isolate