diff options
| author | Sander de Smalen <sander.desmalen@arm.com> | 2023-03-02 11:46:10 +0000 |
|---|---|---|
| committer | Sander de Smalen <sander.desmalen@arm.com> | 2023-03-02 12:07:41 +0000 |
| commit | 170e7a0ec2e6d29cb642ece0bf34f395453d5e68 (patch) | |
| tree | 15e822aef5e066ad5484bfa67065f48b3e365d70 /llvm/lib/CodeGen/ValueTypes.cpp | |
| parent | b4d9ac8b453e20e4223b5935c700698608a6425c (diff) | |
[AArch64][SME2] Add CodeGen support for target("aarch64.svcount").
This patch adds AArch64 CodeGen support such that the type can be passed
and returned to/from functions, and also adds support to use this type in
load/store operations and PHI nodes.
Reviewed By: paulwalker-arm
Differential Revision: https://reviews.llvm.org/D136862
Diffstat (limited to 'llvm/lib/CodeGen/ValueTypes.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/ValueTypes.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/CodeGen/ValueTypes.cpp index 753650dc3eb0..b4c873c0b1ab 100644 --- a/llvm/lib/CodeGen/ValueTypes.cpp +++ b/llvm/lib/CodeGen/ValueTypes.cpp @@ -174,6 +174,8 @@ std::string EVT::getEVTString() const { case MVT::Untyped: return "Untyped"; case MVT::funcref: return "funcref"; case MVT::externref: return "externref"; + case MVT::aarch64svcount: + return "aarch64svcount"; } } @@ -210,6 +212,8 @@ Type *EVT::getTypeForEVT(LLVMContext &Context) const { case MVT::f128: return Type::getFP128Ty(Context); case MVT::ppcf128: return Type::getPPC_FP128Ty(Context); case MVT::x86mmx: return Type::getX86_MMXTy(Context); + case MVT::aarch64svcount: + return TargetExtType::get(Context, "aarch64.svcount"); case MVT::x86amx: return Type::getX86_AMXTy(Context); case MVT::i64x8: return IntegerType::get(Context, 512); case MVT::externref: return Type::getWasm_ExternrefTy(Context); @@ -579,6 +583,12 @@ MVT MVT::getVT(Type *Ty, bool HandleUnknown){ case Type::DoubleTyID: return MVT(MVT::f64); case Type::X86_FP80TyID: return MVT(MVT::f80); case Type::X86_MMXTyID: return MVT(MVT::x86mmx); + case Type::TargetExtTyID: + if (cast<TargetExtType>(Ty)->getName() == "aarch64.svcount") + return MVT(MVT::aarch64svcount); + if (HandleUnknown) + return MVT(MVT::Other); + llvm_unreachable("Unknown target ext type!"); case Type::X86_AMXTyID: return MVT(MVT::x86amx); case Type::FP128TyID: return MVT(MVT::f128); case Type::PPC_FP128TyID: return MVT(MVT::ppcf128); @@ -590,8 +600,6 @@ MVT MVT::getVT(Type *Ty, bool HandleUnknown){ getVT(VTy->getElementType(), /*HandleUnknown=*/ false), VTy->getElementCount()); } - case Type::TargetExtTyID: - return MVT(MVT::Other); } } |
