Re: [PATCH] loop-invariant: Treat inline-asm conditional trapping [PR102150]

2025-02-12 Thread Andrew Pinski
On Wed, Feb 12, 2025 at 1:00 AM Richard Biener wrote: > > On Wed, Feb 12, 2025 at 9:41 AM Andrew Pinski > wrote: > > > > So inline-asm is known not to trap BUT it can have undefined behavior > > if made executed speculatively. This fixes the loop invariant pass to > > treat it similarly as trapp

Re: [PATCH] loop-invariant: Treat inline-asm conditional trapping [PR102150]

2025-02-12 Thread Richard Biener
On Wed, Feb 12, 2025 at 9:41 AM Andrew Pinski wrote: > > So inline-asm is known not to trap BUT it can have undefined behavior > if made executed speculatively. This fixes the loop invariant pass to > treat it similarly as trapping cases. If the inline-asm could be executed > always, then it will

[PATCH] loop-invariant: Treat inline-asm conditional trapping [PR102150]

2025-02-12 Thread Andrew Pinski
So inline-asm is known not to trap BUT it can have undefined behavior if made executed speculatively. This fixes the loop invariant pass to treat it similarly as trapping cases. If the inline-asm could be executed always, then it will be pulled out of the loop; otherwise it will be kept inside the