[all-commits] [llvm/llvm-project] 006d8d: [AMDGPU][SIFoldOperands] Fix OR -1 fold

Manuel Carrasco via All-commits all-commits at lists.llvm.org
Tue Mar 31 06:13:29 PDT 2026


  Branch: refs/heads/users/mgcarrasco/si-fold-operands-or
  Home:   https://github.com/llvm/llvm-project
  Commit: 006d8d63fa88f86062b05a52dd75497f421d1cd9
      https://github.com/llvm/llvm-project/commit/006d8d63fa88f86062b05a52dd75497f421d1cd9
  Author: Manuel Carrasco <Manuel.Carrasco at amd.com>
  Date:   2026-03-31 (Tue, 31 Mar 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/test/CodeGen/AMDGPU/constant-fold-mi-operands.ll
    A llvm/test/CodeGen/AMDGPU/si-fold-operands-or.mir

  Log Message:
  -----------
  [AMDGPU][SIFoldOperands] Fix OR -1 fold

In SIFoldOperands, folding `or x, -1` to `v_mov_b32 -1` removed `Src1Idx`,
which is incorrect because `-1` is in `Src0Idx` (after canonicalization).



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