[LoongArch] Construct codegen infra and generate first add instruction.
authorwanglei <wanglei@loongson.cn>
Thu, 31 Mar 2022 03:48:03 +0000 (11:48 +0800)
committerWeining Lu <luweining@loongson.cn>
Thu, 31 Mar 2022 03:57:07 +0000 (11:57 +0800)
commita1c67439229d6b2b9000aeb4060b4f6fd9550a08
tree61f3f99ad3bf616d5d411f1fdabb1be21aaefdbd
parentee572129ae15bc15e34fcae63643d6998352dab3
[LoongArch] Construct codegen infra and generate first add instruction.

This patch constructs codegen infra and successfully generate the first
'add' instruction. Add integer calling convention for fixed arguments which
are passed with general-purpose registers.

New test added here:

  CodeGen/LoongArch/ir-instruction/add.ll

The test file is placed in a subdirectory because we will use
subdirctories to distinguish different categories of tests (e.g.
 intrinsic, inline-asm ...)

Reviewed By: MaskRay, SixWeining

Differential Revision: https://reviews.llvm.org/D122366
llvm/lib/Target/LoongArch/LoongArch.h
llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp
llvm/lib/Target/LoongArch/LoongArchISelLowering.h
llvm/lib/Target/LoongArch/LoongArchInstrFormats.td
llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
llvm/lib/Target/LoongArch/LoongArchInstrInfo.h
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
llvm/lib/Target/LoongArch/LoongArchTargetMachine.cpp
llvm/test/CodeGen/LoongArch/ir-instruction/add.ll [new file with mode: 0644]