https://gcc.gnu.org/g:6ae2ad3169ab88823d288082a9058c3bf6db40fd
commit r17-5062-g6ae2ad3169ab88823d288082a9058c3bf6db40fd Author: Dimitar Dimitrov <[email protected]> Date: Sun Oct 11 19:08:11 2026 +0300 pru: Handle vector modes in CLZ_DEFINED_VALUE_AT_ZERO Commit r17-5047-gd2e1b1248a17d0 started passing the vector mode instead of scalar mode to CLZ_DEFINED_VALUE_AT_ZERO. This resulted in build failure for pru-unknown-elf: .../gcc/gcc/config/pru/pru.h:576:48: error: cannot convert ‘poly_int<1, long int>’ to ‘int’ in assignment 576 | ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2) Fix by using GET_MODE_UNIT_BITSIZE, the same way the original patch did for other targets. gcc/ChangeLog: * config/pru/pru.h (CLZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_UNIT_BITSIZE. Signed-off-by: Dimitar Dimitrov <[email protected]> Diff: --- gcc/config/pru/pru.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/pru/pru.h b/gcc/config/pru/pru.h index a370d08c3854..c36b8cfd2571 100644 --- a/gcc/config/pru/pru.h +++ b/gcc/config/pru/pru.h @@ -573,7 +573,7 @@ do { \ /* See definition of clz pattern for rationale of the value. */ #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) \ - ((VALUE) = GET_MODE_BITSIZE (MODE) - 1 - 32, 2) + ((VALUE) = GET_MODE_UNIT_BITSIZE (MODE) - 1 - 32, 2) /* Jumps are cheap on PRU. */ #define LOGICAL_OP_NON_SHORT_CIRCUIT 0
