[all-commits] [llvm/llvm-project] 28f1d0: [AMDGPU] Fix 64 bit DPP validation

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Thu May 6 08:40:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 28f1d018b1c241968d3f426d81c6973b5cae7bcf
      https://github.com/llvm/llvm-project/commit/28f1d018b1c241968d3f426d81c6973b5cae7bcf
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2021-05-06 (Thu, 06 May 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
    M llvm/test/MC/AMDGPU/gfx9-asm-err.s
    M llvm/test/MC/AMDGPU/gfx90a_err.s

  Log Message:
  -----------
  [AMDGPU] Fix 64 bit DPP validation

AMDGPUAsmParser::isSupportedDPPCtrl() was failing to correctly
find a DPP register operand, regadless of the position it is
always src0. Moved this check into a new validateDPP() method
where we have full instruction already. In particular it was
failing to reject this case:

v_cvt_u32_f64 v5, v[0:1] quad_perm:[0,2,1,1] row_mask:0xf bank_mask:0xf

Essentially it was broken for any case where size of dst and
src0 differ.

It also improves the diagnostics with a proper error message.

The check in the InstPrinter also drops verification of the dst
register as it does not have anything to do with the dpp operand.

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




More information about the All-commits mailing list