[all-commits] [llvm/llvm-project] bcbd9b: [AMDGPU][MC] Don't accept attr > 32 for param_load

Diana via All-commits all-commits at lists.llvm.org
Sun May 14 23:43:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcbd9b021a2feadc8c2c2560f533dda76f7be26d
      https://github.com/llvm/llvm-project/commit/bcbd9b021a2feadc8c2c2560f533dda76f7be26d
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-05-15 (Mon, 15 May 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/test/MC/AMDGPU/gfx11_asm_ldsdir.s
    A llvm/test/MC/AMDGPU/gfx11_asm_ldsdir_err.s
    M llvm/test/MC/AMDGPU/vintrp-err.s
    M llvm/test/MC/AMDGPU/vintrp.s

  Log Message:
  -----------
  [AMDGPU][MC] Don't accept attr > 32 for param_load

The docs say the interpolation attribute should be between 0..32 [1][2],
but we currently accept values all the way up to 63.

This patch makes the ASMParser error out for values > 32. It does not
touch codegen though because we're currently not checking anything at
all for codegen (llvm.amdgcn.lds.param.load will happily accept even 128
as an attr, although that won't fit in the encoding).

[1] https://llvm.org/docs/AMDGPU/gfx8_attr.html#amdgpu-synid-gfx8-attr
[2] https://llvm.org/docs/AMDGPU/gfx11_attr.html#amdgpu-synid-gfx11-attr

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




More information about the All-commits mailing list