[all-commits] [llvm/llvm-project] 4be413: AMDGPU: Do not try to commute instruction with sam...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Feb 26 17:39:24 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4be4133a9f5a305cc9cd689f0a72b7623a31d0c5
      https://github.com/llvm/llvm-project/commit/4be4133a9f5a305cc9cd689f0a72b7623a31d0c5
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-02-27 (Thu, 27 Feb 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/dag-divergence.ll
    M llvm/test/CodeGen/AMDGPU/div_i128.ll
    M llvm/test/CodeGen/AMDGPU/div_v2i128.ll
    M llvm/test/CodeGen/AMDGPU/rem_i128.ll
    M llvm/test/CodeGen/AMDGPU/si-fold-operands-commute-same-operands-assert.mir

  Log Message:
  -----------
  AMDGPU: Do not try to commute instruction with same input register (#127562)

There's little point to trying to commute an instruction if the
two operands are already the same.

This avoids an assertion in a future patch, but this likely isn't the
correct fix. The worklist management in SIFoldOperands is dodgy, and
we should probably fix it to work like PeepholeOpt (i.e. stop looking
at use lists, and fold from users). This is an extension of the already
handled special case which it's trying to avoid folding an instruction
which is already being folded.



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