Subreg promotion not happening for the test case

2023-10-31 Thread Vineet Gupta
Hi Jeff, Robin, This morning I was talking about the following test where subreg promoted is not being generated during expand, whereas for RISC-V ABI/ISA it should. gcc.c-torture/compile/20070121.c -Os -march=rv64gc -mabi=lp64d expand_gimple_basic_block     expand_gimple_stmt ...     ex

Re: Help with clz(0) and optimization

2023-10-31 Thread Jeff Law via Gcc
On 10/31/23 08:26, Enrico via Gcc wrote: I am working on GCC for a target architecture where clz(0) is defined and is 32 (TriCore). The code under test is the following: #include int f(unsigned int a) { unsigned int res = 32 - __builtin_clz(a); if(res > 0) printf("test"); retu

Help with clz(0) and optimization

2023-10-31 Thread Enrico via Gcc
I am working on GCC for a target architecture where clz(0) is defined and is 32 (TriCore). The code under test is the following: #include int f(unsigned int a) { unsigned int res = 32 - __builtin_clz(a); if(res > 0) printf("test"); return res; } >From GCC version greater and equal to