[all-commits] [llvm/llvm-project] e49103: [Mips] Fix argument lowering for illegal vector ty...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jul 24 03:07:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e49103b2790f346b436b280a2da7a1c6a9f2ab3d
      https://github.com/llvm/llvm-project/commit/e49103b2790f346b436b280a2da7a1c6a9f2ab3d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M llvm/lib/Target/Mips/MipsISelLowering.cpp
    A llvm/test/CodeGen/Mips/cconv/illegal-vectors.ll
    M llvm/test/CodeGen/Mips/cconv/vector.ll

  Log Message:
  -----------
  [Mips] Fix argument lowering for illegal vector types (PR63608)

The Mips MSA ABI requires that legal vector types are passed in
scalar registers in packed representation. E.g. a type like v16i8
would be passed as two i64 registers.

The implementation attempts to do the same for illegal vectors with
non-power-of-two element counts or non-power-of-two element types.
However, the SDAG argument lowering code doesn't support this, and
it is not easy to extend it to support this (we would have to deal
with situations like passing v7i18 as two i64 values).

This patch instead opts to restrict the special argument lowering
to only vectors with power-of-two elements and round element types.
Everything else is lowered naively, that is by passing each element
in promoted registers.

Fixes https://github.com/llvm/llvm-project/issues/63608.

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




More information about the All-commits mailing list