Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-02 Thread Joseph Myers
On Thu, 2 Nov 2023, Richard Biener via Gcc wrote: > Note the semantic of __builtin_clz is _not_ altered by > CLZ_DEFINED_VALUE_AT_ZERO, the behavior > of __builtin_clz (x) is that is has undefined result for x == 0. Note also the discussion in bug 111309 of possible future type-generic versions

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-02 Thread Jakub Jelinek via Gcc
On Thu, Nov 02, 2023 at 04:44:30PM +, Joseph Myers wrote: > On Thu, 2 Nov 2023, Richard Biener via Gcc wrote: > > > Note the semantic of __builtin_clz is _not_ altered by > > CLZ_DEFINED_VALUE_AT_ZERO, the behavior > > of __builtin_clz (x) is that is has undefined result for x == 0. > > Note

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-02 Thread Richard Biener via Gcc
On Wed, Nov 1, 2023 at 12:30 PM Giuseppe Tagliavini via Gcc wrote: > > I found an unexpected issue working with an experimental target (available > here: https://github.com/EEESlab/tricore-gcc), but I was able to reproduce it > on mainstream architectures. For the sake of clarity and reproducibi

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Giuseppe Tagliavini via Gcc
Giuseppe From: Jeff Law Sent: Wednesday, November 1, 2023 5:11 PM To: Giuseppe Tagliavini ; gcc@gcc.gnu.org Subject: Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz On 11/1/23 05:29, Giuseppe Tagliavini via Gcc wr

Re: Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Jeff Law via Gcc
On 11/1/23 05:29, Giuseppe Tagliavini via Gcc wrote: I found an unexpected issue working with an experimental target (available here: https://github.com/EEESlab/tricore-gcc), but I was able to reproduce it on mainstream architectures. For the sake of clarity and reproducibility, I always re

Suspecting a wrong behavior in the value range propagation analysis for __builtin_clz

2023-11-01 Thread Giuseppe Tagliavini via Gcc
I found an unexpected issue working with an experimental target (available here: https://github.com/EEESlab/tricore-gcc), but I was able to reproduce it on mainstream architectures. For the sake of clarity and reproducibility, I always refer to upstream code in the rest of the discussion. Consi