[all-commits] [llvm/llvm-project] 5b18ef: [AMDGPU] Add verification for mandatory literals

Jay Foad via All-commits all-commits at lists.llvm.org
Fri May 20 08:17:01 PDT 2022


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

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/fold-fmaak-bug.ll
    M llvm/test/CodeGen/AMDGPU/verify-constant-bus-violations.mir
    M llvm/test/CodeGen/AMDGPU/verify-duplicate-literal.mir

  Log Message:
  -----------
  [AMDGPU] Add verification for mandatory literals

Extend the literal operand checking in SIInstrInfo::verifyInstruction to
check VOP2 instructions like V_FMAAK_F32 which have a mandatory literal
operand. The rule is that src0 can also be a literal, but only if it is
the same literal value.

AMDGPUAsmParser::validateConstantBusLimitations already handles this
correctly.

Differential Revision: https://reviews.llvm.org/D126063


  Commit: 78ec59e6aea9c29f204877bacfa12d70c21289fc
      https://github.com/llvm/llvm-project/commit/78ec59e6aea9c29f204877bacfa12d70c21289fc
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2022-05-20 (Fri, 20 May 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/test/CodeGen/AMDGPU/fold-fmaak-bug.ll

  Log Message:
  -----------
  [AMDGPU] Handle mandatory literals in isOperandLegal

Extend SIInstrInfo::isOperandLegal to enforce a limit on the number of
literal operands for all VALU instructions, not just VOP3. In particular
it now handles VOP2 instructions with a mandatory literal operand like
V_FMAAK_F32.

Differential Revision: https://reviews.llvm.org/D126064


Compare: https://github.com/llvm/llvm-project/compare/11a09af76d11...78ec59e6aea9


More information about the All-commits mailing list