[all-commits] [llvm/llvm-project] 65d651: [AMDGPU] Look through readfirstlane/readlane in co...

Vikash Gupta via All-commits all-commits at lists.llvm.org
Thu Sep 24 02:03:57 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 65d651bc8fd6d83ae4989d93dc89cb287231afd2
      https://github.com/llvm/llvm-project/commit/65d651bc8fd6d83ae4989d93dc89cb287231afd2
  Author: Vikash Gupta <Vikash.Gupta at amd.com>
  Date:   2026-09-24 (Thu, 24 Sep 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
    M llvm/lib/Target/AMDGPU/SIISelLowering.cpp
    A llvm/test/CodeGen/AMDGPU/GlobalISel/combine-readlane-redundant-and.mir
    A llvm/test/CodeGen/AMDGPU/GlobalISel/known-bits-readlane.mir
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.readfirstlane.ll
    M llvm/test/CodeGen/AMDGPU/llvm.set.rounding.ll
    A llvm/test/CodeGen/AMDGPU/readlane-known-bits.ll

  Log Message:
  -----------
  [AMDGPU] Look through readfirstlane/readlane in computeKnownBitsForTargetInstr. (#224275)

Currently, `computeKnownBitsForTargetInstr` in GISel and
`computeKnownBitsForTargetNode` in SDAG treats
`amdgcn.readfirstlane/readlane` as fully unknown, even though both just
return the data operand's value from some lane. This patch teaches it to
recurse into the data operand (operand 2) and reuse its known bits.

Thus, it unblocks known-bits combines (e.g. redundant_and) that see
these intrinsics while still generic.



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