[all-commits] [llvm/llvm-project] d25c79: [LoongArch] Support InlineAsm for LSX and LASX

Lu Weining via All-commits all-commits at lists.llvm.org
Mon Jul 24 18:03:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d25c79dc70008b835312e5cc7ef48b199fda3165
      https://github.com/llvm/llvm-project/commit/d25c79dc70008b835312e5cc7ef48b199fda3165
  Author: chenli <chenli at loongson.cn>
  Date:   2023-07-25 (Tue, 25 Jul 2023)

  Changed paths:
    M clang/lib/Basic/Targets/LoongArch.cpp
    A clang/test/CodeGen/LoongArch/lasx/inline-asm-gcc-regs-error.c
    A clang/test/CodeGen/LoongArch/lasx/inline-asm-gcc-regs.c
    A clang/test/CodeGen/LoongArch/lasx/inline-asm-operand-modifier.c
    A clang/test/CodeGen/LoongArch/lsx/inline-asm-gcc-regs-error.c
    A clang/test/CodeGen/LoongArch/lsx/inline-asm-gcc-regs.c
    A clang/test/CodeGen/LoongArch/lsx/inline-asm-operand-modifier.c
    M llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
    M llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
    A llvm/test/CodeGen/LoongArch/lasx/inline-asm-operand-modifier.ll
    A llvm/test/CodeGen/LoongArch/lasx/inline-asm-reg-names.ll
    A llvm/test/CodeGen/LoongArch/lsx/inline-asm-operand-modifier.ll
    A llvm/test/CodeGen/LoongArch/lsx/inline-asm-reg-names.ll

  Log Message:
  -----------
  [LoongArch] Support InlineAsm for LSX and LASX

The author of the following files is licongtian <licongtian at loongson.cn>:
- clang/lib/Basic/Targets/LoongArch.cpp
- llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
- llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp

The files mentioned above implement InlineAsm for LSX and LASX as follows:
- Enable clang parsing LSX/LASX register name, such as $vr0.
- Support the case which operand type is 128bit or 256bit when the
  constraints is 'f'.
- Support the way of specifying LSX/LASX register by using constraint,
  such as "={$xr0}".
- Support the operand modifiers 'u' and 'w'.
- Support and legalize the data types and register classes involved in
  LSX/LASX in the lowering process.

Reviewed By: xen0n, SixWeining

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




More information about the All-commits mailing list