[all-commits] [llvm/llvm-project] 066773: [X86] computeKnownBitsForTargetNode - add generic ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Feb 20 09:15:11 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 066773c4117512a76e127741631630fef57caf14
      https://github.com/llvm/llvm-project/commit/066773c4117512a76e127741631630fef57caf14
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-02-20 (Tue, 20 Feb 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-reduce-ctpop.ll

  Log Message:
  -----------
  [X86] computeKnownBitsForTargetNode - add generic handling of PSHUFB

When PSHUFB is used as a LUT (for CTPOP, BITREVERSE etc.), its the source operand that is constant and the index operand the variable. As long as the indices don't set the MSB (which zeros the output element), then the common known bits from the source operand can be used directly, even though the shuffle mask isn't constant.

Further helps to improve CTPOP reduction codegen



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list