llvm/llvm-project

[X86] SimplifyDemandedBitsForTargetNode - add X86ISD::BZHI handling

Open

#177,369 建立於 2026年1月22日

在 GitHub 查看
 (5 留言) (1 反應) (1 負責人)C++ (10,782 fork)batch import
backend:X86good first issue

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

  • 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

貢獻者指南