x86: Simplify VPBROADCASTQ to VUNPCKLQDQ optimization
Refines the x86 assembler's optimization for VPBROADCASTQ to VUNPCKLQDQ, fixing a condition check.
The x86 assembler’s optimization converting VPBROADCASTQ to VUNPCKLQDQ has been slightly simplified by removing an redundant check on the destination operand’s xmmword property. This change corrects a logic flaw introduced in a previous commit, ensuring the optimization applies correctly.
In Details
This commit revisits the optimization logic for transforming VPBROADCASTQ to VUNPCKLQDQ in the x86 gas backend. It appears that a fix in eb4031cb20aa incorrectly added a check for i.op[0].regs->reg_type.bitfield.xmmword (the destination operand). This check is not necessary for the optimization itself, which primarily depends on the source operand's properties and the instruction encoding. Removing this extraneous check rectifies the logic.
- VPBROADCASTQ
- An x86 AVX instruction that broadcasts a 64-bit quadword to all elements within a 128-bit YMM register.
- VUNPCKLQDQ
- An x86 AVX instruction that unpacks and interleaves lower and upper quadwords from two 128-bit source registers into a destination register.
- Optimization
- The process of modifying an algorithm or code structure to improve its efficiency, typically in terms of speed or memory usage.
- xmmword
- Refers to a 128-bit register size, commonly used by SSE and AVX instructions.