GCC Newspaper
NOVEMBER 30, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
pru

Handle vector modes in CLZ_DEFINED_VALUE_AT_ZERO

Fixes a build failure on the PRU target by correctly handling vector modes in CLZ macro.

This commit resolves a build failure on the pru-unknown-elf target that occurred after changes introduced vector modes to CLZ_DEFINED_VALUE_AT_ZERO. The fix uses GET_MODE_UNIT_BITSIZE, similar to previous handling for other targets, to correctly process vector modes and allow the build to complete.

In Details

The CLZ_DEFINED_VALUE_AT_ZERO macro in config/pru/pru.h was failing to compile when passed a vector mode instead of a scalar mode. This change modifies the macro to use GET_MODE_UNIT_BITSIZE, ensuring compatibility with vector modes and resolving a build error on the PRU target.

For Context
CLZ_DEFINED_VALUE_AT_ZERO
A macro likely related to the Count Leading Zeros (CLZ) instruction, possibly handling cases where the result of CLZ is defined at a specific bit position.
vector mode
In GCC, a machine mode that represents a SIMD (Single Instruction, Multiple Data) vector type, capable of holding multiple data elements.
PRU
Programmable Real-time Unit, a microcontroller core often found in Texas Instruments System-on-Chips (SoCs).
GET_MODE_UNIT_BITSIZE
A GCC macro that returns the number of bits in a machine mode, considering the underlying data type's size.
Filed Under: prubuild fixvectorization