llvm/llvm-project

[X86] SimplifyDemandedBitsForTargetNode - add X86ISD::BZHI handling

Aberta

#177.369 aberto em 22 de jan. de 2026

 (5 comentários) (1 reação) (1 responsável)C++ (10.782 forks)batch import
backend:X86good first issue

Métricas do repositório

Stars
 (26.378 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

  • Only the bottom 8 bits of the mask (second operand) are required
  • Based off the known bits of the mask, we can tweak the src DemandedBits - as well as the incoming DemandedBits mask, if the 8 bit mask is known to be less than bitwidth (getMaxValue.ult(BitWidth)) then bits above getMaxValue are not demanded.

Supporting tests can be added to combine-bzhi.ll

See also #177347 and #177364 for refs

https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=bzhi&ig_expand=634,633,5,634

Guia do colaborador