[all-commits] [llvm/llvm-project] f8d3bd: [AMDGPU] Fix SIFixSGPRCopies handling of STRICT_WW...

Jay Foad via All-commits all-commits at lists.llvm.org
Fri May 30 08:33:17 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8d3bdf6a2720b68a32c4588d5a2a8840fc882d3
      https://github.com/llvm/llvm-project/commit/f8d3bdf6a2720b68a32c4588d5a2a8840fc882d3
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2025-05-30 (Fri, 30 May 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp
    A llvm/test/CodeGen/AMDGPU/fix-sgpr-copies-wwm.ll
    A llvm/test/CodeGen/AMDGPU/fix-sgpr-copies-wwm.mir

  Log Message:
  -----------
  [AMDGPU] Fix SIFixSGPRCopies handling of STRICT_WWM and friends (#142122)

SIFixSGPRCopies handled STRICT_WWM (and similar WWM/WQM pseudos) like a
COPY. In particular, if the source was a VGPR and the result was an
SGPR, lowerVGPR2SGPRCopies would replace it with a readfirstlane,
erasing the original pseudo and hence sabotaging the WWM region marking
which is supposed to be performed by SIWholeQuadMode.

Fix this by handling it more like INSERT_SUBREG, PHI and REG_SEQUENCE:
if the source is a VGPR then move the result to a VGPR, and keep the
pseudo.



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