-
Notifications
You must be signed in to change notification settings - Fork 11k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move several vector intrinsics out of experimental namespace #88748
Move several vector intrinsics out of experimental namespace #88748
Conversation
@llvm/pr-subscribers-mlir-llvm @llvm/pr-subscribers-clang Author: Maciej Gabka (mgabka) ChangesThis patch is moving out following intrinsics:
from the experimental namespace. All these intrinsics exist in LLVM for more than a year now, and are widly used, so should not be considered as experimental. Patch is 918.27 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/88748.diff 92 Files Affected:
diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp
index 1f18e0d5ba409a..b89eacd4fc72ee 100644
--- a/clang/lib/CodeGen/CGExprScalar.cpp
+++ b/clang/lib/CodeGen/CGExprScalar.cpp
@@ -2321,7 +2321,7 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) {
}
// Perform VLAT <-> VLST bitcast through memory.
- // TODO: since the llvm.experimental.vector.{insert,extract} intrinsics
+ // TODO: since the llvm.vector.{insert,extract} intrinsics
// require the element types of the vectors to be the same, we
// need to keep this around for bitcasts between VLAT <-> VLST where
// the element types of the vectors are not the same, until we figure
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 9592929d79feb4..f0d99664bd4c3b 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -18770,7 +18770,7 @@ runtime, then the result vector is a :ref:`poison value <poisonvalues>`. The
``idx`` parameter must be a vector index constant type (for most targets this
will be an integer pointer type).
-'``llvm.experimental.vector.reverse``' Intrinsic
+'``llvm.vector.reverse``' Intrinsic
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax:
@@ -18779,13 +18779,13 @@ This is an overloaded intrinsic.
::
- declare <2 x i8> @llvm.experimental.vector.reverse.v2i8(<2 x i8> %a)
- declare <vscale x 4 x i32> @llvm.experimental.vector.reverse.nxv4i32(<vscale x 4 x i32> %a)
+ declare <2 x i8> @llvm.vector.reverse.v2i8(<2 x i8> %a)
+ declare <vscale x 4 x i32> @llvm.vector.reverse.nxv4i32(<vscale x 4 x i32> %a)
Overview:
"""""""""
-The '``llvm.experimental.vector.reverse.*``' intrinsics reverse a vector.
+The '``llvm.vector.reverse.*``' intrinsics reverse a vector.
The intrinsic takes a single vector and returns a vector of matching type but
with the original lane order reversed. These intrinsics work for both fixed
and scalable vectors. While this intrinsic is marked as experimental the
@@ -18797,7 +18797,7 @@ Arguments:
The argument to this intrinsic must be a vector.
-'``llvm.experimental.vector.deinterleave2``' Intrinsic
+'``llvm.vector.deinterleave2``' Intrinsic
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax:
@@ -18806,13 +18806,13 @@ This is an overloaded intrinsic.
::
- declare {<2 x double>, <2 x double>} @llvm.experimental.vector.deinterleave2.v4f64(<4 x double> %vec1)
- declare {<vscale x 4 x i32>, <vscale x 4 x i32>} @llvm.experimental.vector.deinterleave2.nxv8i32(<vscale x 8 x i32> %vec1)
+ declare {<2 x double>, <2 x double>} @llvm.vector.deinterleave2.v4f64(<4 x double> %vec1)
+ declare {<vscale x 4 x i32>, <vscale x 4 x i32>} @llvm.vector.deinterleave2.nxv8i32(<vscale x 8 x i32> %vec1)
Overview:
"""""""""
-The '``llvm.experimental.vector.deinterleave2``' intrinsic constructs two
+The '``llvm.vector.deinterleave2``' intrinsic constructs two
vectors by deinterleaving the even and odd lanes of the input vector.
This intrinsic works for both fixed and scalable vectors. While this intrinsic
@@ -18824,7 +18824,7 @@ For example:
.. code-block:: text
- {<2 x i64>, <2 x i64>} llvm.experimental.vector.deinterleave2.v4i64(<4 x i64> <i64 0, i64 1, i64 2, i64 3>); ==> {<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>}
+ {<2 x i64>, <2 x i64>} llvm.vector.deinterleave2.v4i64(<4 x i64> <i64 0, i64 1, i64 2, i64 3>); ==> {<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>}
Arguments:
""""""""""
@@ -18832,7 +18832,7 @@ Arguments:
The argument is a vector whose type corresponds to the logical concatenation of
the two result types.
-'``llvm.experimental.vector.interleave2``' Intrinsic
+'``llvm.vector.interleave2``' Intrinsic
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax:
@@ -18841,13 +18841,13 @@ This is an overloaded intrinsic.
::
- declare <4 x double> @llvm.experimental.vector.interleave2.v4f64(<2 x double> %vec1, <2 x double> %vec2)
- declare <vscale x 8 x i32> @llvm.experimental.vector.interleave2.nxv8i32(<vscale x 4 x i32> %vec1, <vscale x 4 x i32> %vec2)
+ declare <4 x double> @llvm.vector.interleave2.v4f64(<2 x double> %vec1, <2 x double> %vec2)
+ declare <vscale x 8 x i32> @llvm.vector.interleave2.nxv8i32(<vscale x 4 x i32> %vec1, <vscale x 4 x i32> %vec2)
Overview:
"""""""""
-The '``llvm.experimental.vector.interleave2``' intrinsic constructs a vector
+The '``llvm.vector.interleave2``' intrinsic constructs a vector
by interleaving two input vectors.
This intrinsic works for both fixed and scalable vectors. While this intrinsic
@@ -18859,7 +18859,7 @@ For example:
.. code-block:: text
- <4 x i64> llvm.experimental.vector.interleave2.v4i64(<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>); ==> <4 x i64> <i64 0, i64 1, i64 2, i64 3>
+ <4 x i64> llvm.vector.interleave2.v4i64(<2 x i64> <i64 0, i64 2>, <2 x i64> <i64 1, i64 3>); ==> <4 x i64> <i64 0, i64 1, i64 2, i64 3>
Arguments:
""""""""""
@@ -18905,7 +18905,7 @@ The '``llvm.experimental.cttz.elts``' intrinsic counts the trailing (least
significant) zero elements in a vector. If ``src == 0`` the result is the
number of elements in the input vector.
-'``llvm.experimental.vector.splice``' Intrinsic
+'``llvm.vector.splice``' Intrinsic
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Syntax:
@@ -18914,13 +18914,13 @@ This is an overloaded intrinsic.
::
- declare <2 x double> @llvm.experimental.vector.splice.v2f64(<2 x double> %vec1, <2 x double> %vec2, i32 %imm)
- declare <vscale x 4 x i32> @llvm.experimental.vector.splice.nxv4i32(<vscale x 4 x i32> %vec1, <vscale x 4 x i32> %vec2, i32 %imm)
+ declare <2 x double> @llvm.vector.splice.v2f64(<2 x double> %vec1, <2 x double> %vec2, i32 %imm)
+ declare <vscale x 4 x i32> @llvm.vector.splice.nxv4i32(<vscale x 4 x i32> %vec1, <vscale x 4 x i32> %vec2, i32 %imm)
Overview:
"""""""""
-The '``llvm.experimental.vector.splice.*``' intrinsics construct a vector by
+The '``llvm.vector.splice.*``' intrinsics construct a vector by
concatenating elements from the first input vector with elements of the second
input vector, returning a vector of the same type as the input vectors. The
signed immediate, modulo the number of elements in the vector, is the index
@@ -18939,8 +18939,8 @@ For example:
.. code-block:: text
- llvm.experimental.vector.splice(<A,B,C,D>, <E,F,G,H>, 1); ==> <B, C, D, E> index
- llvm.experimental.vector.splice(<A,B,C,D>, <E,F,G,H>, -3); ==> <B, C, D, E> trailing elements
+ llvm.vector.splice(<A,B,C,D>, <E,F,G,H>, 1); ==> <B, C, D, E> index
+ llvm.vector.splice(<A,B,C,D>, <E,F,G,H>, -3); ==> <B, C, D, E> trailing elements
Arguments:
@@ -22163,7 +22163,7 @@ Overview:
"""""""""
The '``llvm.experimental.vp.splice.*``' intrinsic is the vector length
-predicated version of the '``llvm.experimental.vector.splice.*``' intrinsic.
+predicated version of the '``llvm.vector.splice.*``' intrinsic.
Arguments:
""""""""""
@@ -22222,7 +22222,7 @@ Overview:
"""""""""
The '``llvm.experimental.vp.reverse.*``' intrinsic is the vector length
-predicated version of the '``llvm.experimental.vector.reverse.*``' intrinsic.
+predicated version of the '``llvm.vector.reverse.*``' intrinsic.
Arguments:
""""""""""
diff --git a/llvm/docs/ReleaseNotes.rst b/llvm/docs/ReleaseNotes.rst
index 11add9274a7a07..c11a59c1ebc08e 100644
--- a/llvm/docs/ReleaseNotes.rst
+++ b/llvm/docs/ReleaseNotes.rst
@@ -50,6 +50,11 @@ Update on required toolchains to build LLVM
Changes to the LLVM IR
----------------------
+* Renamed ``llvm.experimental.vector.reverse`` intrinsic to ``llvm.vector.reverse``.
+* Renamed ``llvm.experimental.vector.splice`` intrinsic to ``llvm.vector.splice``.
+* Renamed ``llvm.experimental.vector.interleave2`` intrinsic to ``llvm.vector.interleave2``.
+* Renamed ``llvm.experimental.vector.deinterleave2`` intrinsic to ``llvm.vector.deinterleave2``.
+
Changes to LLVM infrastructure
------------------------------
diff --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index 06a19c75cf873a..d111684e2b0018 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -1662,12 +1662,12 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
TTI::SK_InsertSubvector, cast<VectorType>(Args[0]->getType()),
std::nullopt, CostKind, Index, cast<VectorType>(Args[1]->getType()));
}
- case Intrinsic::experimental_vector_reverse: {
+ case Intrinsic::vector_reverse: {
return thisT()->getShuffleCost(
TTI::SK_Reverse, cast<VectorType>(Args[0]->getType()), std::nullopt,
CostKind, 0, cast<VectorType>(RetTy));
}
- case Intrinsic::experimental_vector_splice: {
+ case Intrinsic::vector_splice: {
unsigned Index = cast<ConstantInt>(Args[2])->getZExtValue();
return thisT()->getShuffleCost(
TTI::SK_Splice, cast<VectorType>(Args[0]->getType()), std::nullopt,
diff --git a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
index 5f28908e998a9b..deae2c55d26e27 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/IRTranslator.h
@@ -247,8 +247,8 @@ class IRTranslator : public MachineFunctionPass {
bool translateTrap(const CallInst &U, MachineIRBuilder &MIRBuilder,
unsigned Opcode);
- // Translate @llvm.experimental.vector.interleave2 and
- // @llvm.experimental.vector.deinterleave2 intrinsics for fixed-width vector
+ // Translate @llvm.vector.interleave2 and
+ // @llvm.vector.deinterleave2 intrinsics for fixed-width vector
// types into vector shuffles.
bool translateVectorInterleave2Intrinsic(const CallInst &CI,
MachineIRBuilder &MIRBuilder);
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index e0ade02959025f..69a59bcc215595 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -3140,7 +3140,7 @@ class TargetLoweringBase {
/// Lower a deinterleave intrinsic to a target specific load intrinsic.
/// Return true on success. Currently only supports
- /// llvm.experimental.vector.deinterleave2
+ /// llvm.vector.deinterleave2
///
/// \p DI is the deinterleave intrinsic.
/// \p LI is the accompanying load instruction
@@ -3151,7 +3151,7 @@ class TargetLoweringBase {
/// Lower an interleave intrinsic to a target specific store intrinsic.
/// Return true on success. Currently only supports
- /// llvm.experimental.vector.interleave2
+ /// llvm.vector.interleave2
///
/// \p II is the interleave intrinsic.
/// \p SI is the accompanying store instruction
diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index bdd8465883fcff..c709fe5eab3b84 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -2550,11 +2550,11 @@ def int_preserve_static_offset : DefaultAttrsIntrinsic<[llvm_ptr_ty],
//===------------ Intrinsics to perform common vector shuffles ------------===//
-def int_experimental_vector_reverse : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
+def int_vector_reverse : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
[LLVMMatchType<0>],
[IntrNoMem]>;
-def int_experimental_vector_splice : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
+def int_vector_splice : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
[LLVMMatchType<0>,
LLVMMatchType<0>,
llvm_i32_ty],
@@ -2573,12 +2573,12 @@ def int_vector_extract : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
[IntrNoMem, IntrSpeculatable, ImmArg<ArgIndex<1>>]>;
-def int_experimental_vector_interleave2 : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
+def int_vector_interleave2 : DefaultAttrsIntrinsic<[llvm_anyvector_ty],
[LLVMHalfElementsVectorType<0>,
LLVMHalfElementsVectorType<0>],
[IntrNoMem]>;
-def int_experimental_vector_deinterleave2 : DefaultAttrsIntrinsic<[LLVMHalfElementsVectorType<0>,
+def int_vector_deinterleave2 : DefaultAttrsIntrinsic<[LLVMHalfElementsVectorType<0>,
LLVMHalfElementsVectorType<0>],
[llvm_anyvector_ty],
[IntrNoMem]>;
diff --git a/llvm/include/llvm/IR/PatternMatch.h b/llvm/include/llvm/IR/PatternMatch.h
index 92cb79d54afc29..8b0b52c69d6629 100644
--- a/llvm/include/llvm/IR/PatternMatch.h
+++ b/llvm/include/llvm/IR/PatternMatch.h
@@ -2498,7 +2498,7 @@ inline typename m_Intrinsic_Ty<Opnd0, Opnd1>::Ty m_CopySign(const Opnd0 &Op0,
template <typename Opnd0>
inline typename m_Intrinsic_Ty<Opnd0>::Ty m_VecReverse(const Opnd0 &Op0) {
- return m_Intrinsic<Intrinsic::experimental_vector_reverse>(Op0);
+ return m_Intrinsic<Intrinsic::vector_reverse>(Op0);
}
//===----------------------------------------------------------------------===//
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 4e6e666922671d..c8e1e925518440 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -6285,11 +6285,11 @@ static Value *simplifyUnaryIntrinsic(Function *F, Value *Op0,
m_Intrinsic<Intrinsic::pow>(m_SpecificFP(10.0), m_Value(X)))))
return X;
break;
- case Intrinsic::experimental_vector_reverse:
- // experimental.vector.reverse(experimental.vector.reverse(x)) -> x
+ case Intrinsic::vector_reverse:
+ // vector.reverse(vector.reverse(x)) -> x
if (match(Op0, m_VecReverse(m_Value(X))))
return X;
- // experimental.vector.reverse(splat(X)) -> splat(X)
+ // vector.reverse(splat(X)) -> splat(X)
if (isSplatValue(Op0))
return Op0;
break;
diff --git a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
index 031a271de5bd75..8573b016d1e5bb 100644
--- a/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ b/llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -1639,8 +1639,7 @@ bool ComplexDeinterleavingGraph::checkNodes() {
ComplexDeinterleavingGraph::NodePtr
ComplexDeinterleavingGraph::identifyRoot(Instruction *RootI) {
if (auto *Intrinsic = dyn_cast<IntrinsicInst>(RootI)) {
- if (Intrinsic->getIntrinsicID() !=
- Intrinsic::experimental_vector_interleave2)
+ if (Intrinsic->getIntrinsicID() != Intrinsic::vector_interleave2)
return nullptr;
auto *Real = dyn_cast<Instruction>(Intrinsic->getOperand(0));
@@ -1675,7 +1674,7 @@ ComplexDeinterleavingGraph::identifyDeinterleave(Instruction *Real,
Value *FinalValue = nullptr;
if (match(Real, m_ExtractValue<0>(m_Instruction(I))) &&
match(Imag, m_ExtractValue<1>(m_Specific(I))) &&
- match(I, m_Intrinsic<Intrinsic::experimental_vector_deinterleave2>(
+ match(I, m_Intrinsic<Intrinsic::vector_deinterleave2>(
m_Value(FinalValue)))) {
NodePtr PlaceholderNode = prepareCompositeNode(
llvm::ComplexDeinterleavingOperation::Deinterleave, Real, Imag);
@@ -1960,13 +1959,11 @@ Value *ComplexDeinterleavingGraph::replaceNode(IRBuilderBase &Builder,
// Splats that are not constant are interleaved where they are located
Instruction *InsertPoint = (I->comesBefore(R) ? R : I)->getNextNode();
IRBuilder<> IRB(InsertPoint);
- ReplacementNode =
- IRB.CreateIntrinsic(Intrinsic::experimental_vector_interleave2, NewTy,
- {Node->Real, Node->Imag});
+ ReplacementNode = IRB.CreateIntrinsic(Intrinsic::vector_interleave2,
+ NewTy, {Node->Real, Node->Imag});
} else {
- ReplacementNode =
- Builder.CreateIntrinsic(Intrinsic::experimental_vector_interleave2,
- NewTy, {Node->Real, Node->Imag});
+ ReplacementNode = Builder.CreateIntrinsic(
+ Intrinsic::vector_interleave2, NewTy, {Node->Real, Node->Imag});
}
break;
}
@@ -1991,9 +1988,8 @@ Value *ComplexDeinterleavingGraph::replaceNode(IRBuilderBase &Builder,
auto *B = replaceNode(Builder, Node->Operands[1]);
auto *NewMaskTy = VectorType::getDoubleElementsVectorType(
cast<VectorType>(MaskReal->getType()));
- auto *NewMask =
- Builder.CreateIntrinsic(Intrinsic::experimental_vector_interleave2,
- NewMaskTy, {MaskReal, MaskImag});
+ auto *NewMask = Builder.CreateIntrinsic(Intrinsic::vector_interleave2,
+ NewMaskTy, {MaskReal, MaskImag});
ReplacementNode = Builder.CreateSelect(NewMask, A, B);
break;
}
@@ -2021,8 +2017,8 @@ void ComplexDeinterleavingGraph::processReductionOperation(
Value *InitImag = OldPHIImag->getIncomingValueForBlock(Incoming);
IRBuilder<> Builder(Incoming->getTerminator());
- auto *NewInit = Builder.CreateIntrinsic(
- Intrinsic::experimental_vector_interleave2, NewVTy, {InitReal, InitImag});
+ auto *NewInit = Builder.CreateIntrinsic(Intrinsic::vector_interleave2, NewVTy,
+ {InitReal, InitImag});
NewPHI->addIncoming(NewInit, Incoming);
NewPHI->addIncoming(OperationReplacement, BackEdge);
@@ -2034,9 +2030,9 @@ void ComplexDeinterleavingGraph::processReductionOperation(
Builder.SetInsertPoint(
&*FinalReductionReal->getParent()->getFirstInsertionPt());
- auto *Deinterleave = Builder.CreateIntrinsic(
- Intrinsic::experimental_vector_deinterleave2,
- OperationReplacement->getType(), OperationReplacement);
+ auto *Deinterleave = Builder.CreateIntrinsic(Intrinsic::vector_deinterleave2,
+ OperationReplacement->getType(),
+ OperationReplacement);
auto *NewReal = Builder.CreateExtractValue(Deinterleave, (uint64_t)0);
FinalReductionReal->replaceUsesOfWith(Real, NewReal);
diff --git a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
index 9b4575f7f34d47..96a66226d18262 100644
--- a/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -1804,7 +1804,7 @@ bool IRTranslator::translateTrap(const CallInst &CI,
bool IRTranslator::translateVectorInterleave2Intrinsic(
const CallInst &CI, MachineIRBuilder &MIRBuilder) {
- assert(CI.getIntrinsicID() == Intrinsic::experimental_vector_interleave2 &&
+ assert(CI.getIntrinsicID() == Intrinsic::vector_interleave2 &&
"This function can only be called on the interleave2 intrinsic!");
// Canonicalize interleave2 to G_SHUFFLE_VECTOR (similar to SelectionDAG).
Register Op0 = getOrCreateVReg(*CI.getOperand(0));
@@ -1820,7 +1820,7 @@ bool IRTranslator::translateVectorInterleave2Intrinsic(
bool IRTranslator::translateVectorDeinterleave2Intrinsic(
const CallInst &CI, MachineIRBuilder &MIRBuilder) {
- assert(CI.getIntrinsicID() == Intrinsic::experimental_vector_deinterleave2 &&
+ assert(CI.getIntrinsicID() == Intrinsic::vector_deinterleave2 &&
"This function can only be called on the deinterleave2 intrinsic!");
// Canonicalize deinterleave2 to shuffles that extract sub-vectors (similar to
// SelectionDAG).
@@ -2570,15 +2570,15 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
return true;
}
- case Intrinsic::experimental_vector_interleave2:
- case Intrinsic::experimental_vector_deinterleave2: {
+ case Intrinsic::vector_interleave2:
+ case Intrinsic::vector_deinterleave2: {
// Both intrinsics have ...
[truncated]
|
I think should be vector.reverse? |
widly -> widely |
llvm/lib/IR/AutoUpgrade.cpp
Outdated
if (ID == Intrinsic::vector_interleave2) | ||
NewFn = Intrinsic::getDeclaration(F->getParent(), ID, | ||
FT->getReturnType()); | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be consistent about the use of curly braces between if
and else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing this out, decided to merge this with the similar section for insert/extract.
llvm/docs/LangRef.rst
Outdated
|
||
Overview: | ||
""""""""" | ||
|
||
The '``llvm.experimental.vector.reverse.*``' intrinsics reverse a vector. | ||
The '``llvm.vector.reverse.*``' intrinsics reverse a vector. | ||
The intrinsic takes a single vector and returns a vector of matching type but | ||
with the original lane order reversed. These intrinsics work for both fixed | ||
and scalable vectors. While this intrinsic is marked as experimental the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this intrinsic is marked as experimental
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed it.
|
||
Overview: | ||
""""""""" | ||
|
||
The '``llvm.experimental.vector.splice.*``' intrinsics construct a vector by | ||
The '``llvm.vector.splice.*``' intrinsics construct a vector by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this intrinsicis marked as experimental,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed it.
Will fix the commit message when merging the PR. |
Thanks for patch. We use I don't know what the policy is for promoting intrinsics from experimental to first-class or if it's documented anywhere (?), but I would expect this to be accompanied with an RFC / announcement on Discourse. Also, what about |
I don't remember any intrinsic ever making the move out of experimental. It seems to be a permanent prefix |
At least the vector.reduce intrinsics were moved out of the experimental namespace. |
I was actually following this patch https://reviews.llvm.org/D127976 which promoted vector.insert/extract and there was no RFC for it. My plan was to promote stepvector as well in separate PR. I am happy to raise an RFC if you feel that it is worth it. |
👍
The reduction intrinsics were accompanied with an RFC: I think at least an announcement with a link to the patch for visibility would be worthwhile. |
a8c2e4d
to
83ac830
Compare
Rebased on newer LLVM + forcing to re-run the testing which previously failed on some not related issues. |
Not sure if you missed my previous comment but you need to update the
|
@c-rhodes the remaining failure is MLIR :: Conversion/TosaToTensor/tosa-to-tensor.mlir but it also fails without my changes. |
Very likely unrelated we only added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one final comment, otherwise LGTM cheers.
llvm/test/Bitcode/upgrade-vector-interleave2-deinterleave2-intrinsics.ll
Show resolved
Hide resolved
This patch is moving out following intrinsics: * vector.interleave2/deinterleave2 * vector.reverse * vector.splice from the experimental namespace. All these intrinsics exist in LLVM for more than a year now, and are widely used, so should not be considered as experimental.
7e18d7c
to
7869d1d
Compare
I needed to adjust one more test after another rebase: I am merging it know without waiting for the pre commit validation, otrherwise will most likely need to update another tests etc. |
LLVM has dropped the "experimental" from several intrinsic instructions as of llvm/llvm-project#88748. This updates the Mojo standard library to use the new spelling. MODULAR_ORIG_COMMIT_REV_ID: 4bcf10cd6eec7524990823e0b3d33276f0c427c8
LLVM has dropped the "experimental" from several intrinsic instructions as of llvm/llvm-project#88748. This updates the Mojo standard library to use the new spelling. MODULAR_ORIG_COMMIT_REV_ID: 4bcf10cd6eec7524990823e0b3d33276f0c427c8 Signed-off-by: Lukas Hermann <lukashermann28@gmail.com>
LLVM has dropped the "experimental" from several intrinsic instructions as of llvm/llvm-project#88748. This updates the Mojo standard library to use the new spelling. MODULAR_ORIG_COMMIT_REV_ID: 4bcf10cd6eec7524990823e0b3d33276f0c427c8
LLVM has dropped the "experimental" from several intrinsic instructions as of llvm/llvm-project#88748. This updates the Mojo standard library to use the new spelling. MODULAR_ORIG_COMMIT_REV_ID: 4bcf10cd6eec7524990823e0b3d33276f0c427c8
LLVM has dropped the "experimental" from several intrinsic instructions as of llvm/llvm-project#88748. This updates the Mojo standard library to use the new spelling. MODULAR_ORIG_COMMIT_REV_ID: 4bcf10cd6eec7524990823e0b3d33276f0c427c8
This patch is moving out following intrinsics:
from the experimental namespace.
All these intrinsics exist in LLVM for more than a year now, and are widely used, so should not be considered as experimental.