[all-commits] [llvm/llvm-project] 5c7ee8: AMDGPU: Stop validating earlyclobber operands in a...

Jay Foad via All-commits all-commits at lists.llvm.org
Wed Sep 21 13:47:21 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c7ee894f8039902b9cd6da3db39b43819ca3996
      https://github.com/llvm/llvm-project/commit/5c7ee894f8039902b9cd6da3db39b43819ca3996
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2022-09-21 (Wed, 21 Sep 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
    M llvm/test/MC/AMDGPU/gfx10_err_pos.s
    M llvm/test/MC/AMDGPU/vop3-errs.s

  Log Message:
  -----------
  AMDGPU: Stop validating earlyclobber operands in assembler

This validation was introduced in D34003 for v_qsad/v_mqsad instructions
but it applies to all instructions with earlyclobber operands, which now
includes v_mad_i64/v_mad_u64.

In all these cases I do not think there is documentation saying that the
destination must not overlap the sources. Rather there are *some* cases
where the instruction may not function correctly if there is an overlap,
and we are using earlyclobber as a conservative way of preventing
codegen from generating those cases.

I think it is unhelpful for the assembler to enforce the earlyclobber
restriction because it prevents assembling cases where the programmer
knows that in fact the overlap is safe.

See also: https://github.com/llvm/llvm-project/issues/57610

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




More information about the All-commits mailing list