mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[clang][AArch64][SVE] Avoid going through memory for VLAT <-> VLST casts
This change makes use of the llvm.vector.extract intrinsic to avoid going through memory when performing bitcasts between vector-length agnostic types and vector-length specific types. Depends on D91362 Reviewed By: c-rhodes Differential Revision: https://reviews.llvm.org/D92761
This commit is contained in:
parent
e7d3773d91
commit
b9b87adf55
@ -923,6 +923,22 @@ public:
|
||||
return CreateBinaryIntrinsic(Intrinsic::maximum, LHS, RHS, nullptr, Name);
|
||||
}
|
||||
|
||||
/// Create a call to the experimental.vector.extract intrinsic.
|
||||
CallInst *CreateExtractVector(Type *DstType, Value *SrcVec, Value *Idx,
|
||||
const Twine &Name = "") {
|
||||
return CreateIntrinsic(Intrinsic::experimental_vector_extract,
|
||||
{DstType, SrcVec->getType()}, {SrcVec, Idx}, nullptr,
|
||||
Name);
|
||||
}
|
||||
|
||||
/// Create a call to the experimental.vector.insert intrinsic.
|
||||
CallInst *CreateInsertVector(Type *DstType, Value *SrcVec, Value *SubVec,
|
||||
Value *Idx, const Twine &Name = "") {
|
||||
return CreateIntrinsic(Intrinsic::experimental_vector_insert,
|
||||
{DstType, SubVec->getType()}, {SrcVec, SubVec, Idx},
|
||||
nullptr, Name);
|
||||
}
|
||||
|
||||
private:
|
||||
/// Create a call to a masked intrinsic with given Id.
|
||||
CallInst *CreateMaskedIntrinsic(Intrinsic::ID Id, ArrayRef<Value *> Ops,
|
||||
|
Loading…
Reference in New Issue
Block a user