diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2023-05-12 08:21:54 +0000 |
---|---|---|
committer | Sander de Smalen <sander.desmalen@arm.com> | 2023-05-12 08:43:12 +0000 |
commit | 3b95b818135f85376082621149e59c297f640c14 (patch) | |
tree | 33f88cad09176444d6625be5230ce7166cacdc1f /llvm/lib/IR/Function.cpp | |
parent | 773b0aaa49170a97b4de7968c4b6dbc7673aba23 (diff) | |
download | llvm-3b95b818135f85376082621149e59c297f640c14.zip llvm-3b95b818135f85376082621149e59c297f640c14.tar.gz llvm-3b95b818135f85376082621149e59c297f640c14.tar.bz2 |
[AArch64][SME2/SVE2p1] Add predicate-as-counter intrinsics for ptrue/cntp
These intrinsics are used to implement:
* svptrue_c8(), svptrue_c16(), etc.
* svcntp_c8(svcount_t pnn, uint64_t vl), svcntp_c16(...), etc.
As described in https://github.com/ARM-software/acle/pull/217
Reviewed By: david-arm
Differential Revision: https://reviews.llvm.org/D150263
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r-- | llvm/lib/IR/Function.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp index 300e022..fb29918 100644 --- a/llvm/lib/IR/Function.cpp +++ b/llvm/lib/IR/Function.cpp @@ -1099,6 +1099,9 @@ static void DecodeIITType(unsigned &NextElt, ArrayRef<unsigned char> Infos, case IIT_I4: OutputTable.push_back(IITDescriptor::get(IITDescriptor::Integer, 4)); return; + case IIT_AARCH64_SVCOUNT: + OutputTable.push_back(IITDescriptor::get(IITDescriptor::AArch64Svcount, 0)); + return; case IIT_I8: OutputTable.push_back(IITDescriptor::get(IITDescriptor::Integer, 8)); return; @@ -1340,6 +1343,8 @@ static Type *DecodeFixedType(ArrayRef<Intrinsic::IITDescriptor> &Infos, case IITDescriptor::Double: return Type::getDoubleTy(Context); case IITDescriptor::Quad: return Type::getFP128Ty(Context); case IITDescriptor::PPCQuad: return Type::getPPC_FP128Ty(Context); + case IITDescriptor::AArch64Svcount: + return TargetExtType::get(Context, "aarch64.svcount"); case IITDescriptor::Integer: return IntegerType::get(Context, D.Integer_Width); @@ -1514,6 +1519,9 @@ static bool matchIntrinsicType( case IITDescriptor::Quad: return !Ty->isFP128Ty(); case IITDescriptor::PPCQuad: return !Ty->isPPC_FP128Ty(); case IITDescriptor::Integer: return !Ty->isIntegerTy(D.Integer_Width); + case IITDescriptor::AArch64Svcount: + return !isa<TargetExtType>(Ty) || + cast<TargetExtType>(Ty)->getName() != "aarch64.svcount"; case IITDescriptor::Vector: { VectorType *VT = dyn_cast<VectorType>(Ty); return !VT || VT->getElementCount() != D.Vector_Width || |