MONDAY, SEPTEMBER 21, 2026
amdgcn
Fix vector popcount instruction for AMD GCN targets
Corrects the vector version of the popcount instruction on AMD GCN architectures.
A bug in the vector version of the population count (popcount) instruction for AMD GCN targets has been fixed. The v_bcnt instruction was missing its third parameter, which is present in the scalar version. This commit adds the necessary parameter, ensuring correct execution of vector popcount operations.
In Details
The vector expansion for the popcount instruction (v_bcnt) on AMD GCN targets was missing its third operand in the gcn-valu.md file. This commit adds popcount_extra_op to the <expander><mode>2<exec> definition, correcting the instruction's format and addressing PR127542.
For Context
- popcount
- A CPU instruction that counts the number of set bits (1s) in a binary integer.
- amdgcn
- AMD's Graphics Core Next architecture, a series of GPUs for which GCC provides backend support.
- instruction (insn)
- A single operation that a computer's CPU can execute. In GCC, 'insn' often refers to the compiler's internal representation of machine instructions.
- PR127542
- Problem Report 127542, a bug tracking identifier within the GCC bug tracking system.