[all-commits] [llvm/llvm-project] 87d884: [AMDGPU] Fix folding of v2i16/v2f16 splat imms (#7...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Tue Nov 28 09:07:39 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 87d884b5c8ff3f477b54fcd5a7966df49f1f8111
      https://github.com/llvm/llvm-project/commit/87d884b5c8ff3f477b54fcd5a7966df49f1f8111
  Author: Stanislav Mekhanoshin <rampitec at users.noreply.github.com>
  Date:   2023-11-28 (Tue, 28 Nov 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
    M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fdot2.bf16.bf16.ll

  Log Message:
  -----------
  [AMDGPU] Fix folding of v2i16/v2f16 splat imms (#72709)

We can use inline constants with packed 16-bit operands, but these
should use op_sel. Currently splat of inlinable constants is considered
legal, which is not really true if we fail to fold it with op_sel and
drop the high half. It may be legal as a literal but not as inline
constant, but then usual literal checks must be performed.

This patch makes these splat literals illegal but adds additional logic
to the operand folding to keep current folds. This logic is somewhat
heavy though.

This has fixed constant bus violation in the fdot2 test.




More information about the All-commits mailing list