Revert r361953 "[SVE][IR] Scalable Vector IR Type"
This reverts commit f4fc01f8dd3a5dfd2060d1ad0df6b90e8351ddf7.
It caused a 3-4x slowdown when doing thinlto links, PR42210.
llvm-svn: 362913
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 2105ce9..20e94b4 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -675,9 +675,6 @@
Variables and aliases can have a
:ref:`Thread Local Storage Model <tls_model>`.
-:ref:`Scalable vectors <t_vector>` cannot be global variables or members of
-structs or arrays because their size is unknown at compile time.
-
Syntax::
@<GlobalVarName> = [Linkage] [PreemptionSpecifier] [Visibility]
@@ -2736,40 +2733,30 @@
A vector type is a simple derived type that represents a vector of
elements. Vector types are used when multiple primitive data are
operated in parallel using a single instruction (SIMD). A vector type
-requires a size (number of elements), an underlying primitive data type,
-and a scalable property to represent vectors where the exact hardware
-vector length is unknown at compile time. Vector types are considered
-:ref:`first class <t_firstclass>`.
+requires a size (number of elements) and an underlying primitive data
+type. Vector types are considered :ref:`first class <t_firstclass>`.
:Syntax:
::
- < <# elements> x <elementtype> > ; Fixed-length vector
- < vscale x <# elements> x <elementtype> > ; Scalable vector
+ < <# elements> x <elementtype> >
The number of elements is a constant integer value larger than 0;
elementtype may be any integer, floating-point or pointer type. Vectors
-of size zero are not allowed. For scalable vectors, the total number of
-elements is a constant multiple (called vscale) of the specified number
-of elements; vscale is a positive integer that is unknown at compile time
-and the same hardware-dependent constant for all scalable vectors at run
-time. The size of a specific scalable vector type is thus constant within
-IR, even if the exact size in bytes cannot be determined until run time.
+of size zero are not allowed.
:Examples:
-+------------------------+----------------------------------------------------+
-| ``<4 x i32>`` | Vector of 4 32-bit integer values. |
-+------------------------+----------------------------------------------------+
-| ``<8 x float>`` | Vector of 8 32-bit floating-point values. |
-+------------------------+----------------------------------------------------+
-| ``<2 x i64>`` | Vector of 2 64-bit integer values. |
-+------------------------+----------------------------------------------------+
-| ``<4 x i64*>`` | Vector of 4 pointers to 64-bit integer values. |
-+------------------------+----------------------------------------------------+
-| ``<vscale x 4 x i32>`` | Vector with a multiple of 4 32-bit integer values. |
-+------------------------+----------------------------------------------------+
++-------------------+--------------------------------------------------+
+| ``<4 x i32>`` | Vector of 4 32-bit integer values. |
++-------------------+--------------------------------------------------+
+| ``<8 x float>`` | Vector of 8 32-bit floating-point values. |
++-------------------+--------------------------------------------------+
+| ``<2 x i64>`` | Vector of 2 64-bit integer values. |
++-------------------+--------------------------------------------------+
+| ``<4 x i64*>`` | Vector of 4 pointers to 64-bit integer values. |
++-------------------+--------------------------------------------------+
.. _t_label:
@@ -8151,7 +8138,6 @@
::
<result> = extractelement <n x <ty>> <val>, <ty2> <idx> ; yields <ty>
- <result> = extractelement <vscale x n x <ty>> <val>, <ty2> <idx> ; yields <ty>
Overview:
"""""""""
@@ -8172,9 +8158,7 @@
The result is a scalar of the same type as the element type of ``val``.
Its value is the value at position ``idx`` of ``val``. If ``idx``
-exceeds the length of ``val`` for a fixed-length vector, the result is a
-:ref:`poison value <poisonvalues>`. For a scalable vector, if the value
-of ``idx`` exceeds the runtime length of the vector, the result is a
+exceeds the length of ``val``, the result is a
:ref:`poison value <poisonvalues>`.
Example:
@@ -8195,7 +8179,6 @@
::
<result> = insertelement <n x <ty>> <val>, <ty> <elt>, <ty2> <idx> ; yields <n x <ty>>
- <result> = insertelement <vscale x n x <ty>> <val>, <ty> <elt>, <ty2> <idx> ; yields <vscale x n x <ty>>
Overview:
"""""""""
@@ -8217,9 +8200,7 @@
The result is a vector of the same type as ``val``. Its element values
are those of ``val`` except at position ``idx``, where it gets the value
-``elt``. If ``idx`` exceeds the length of ``val`` for a fixed-length vector,
-the result is a :ref:`poison value <poisonvalues>`. For a scalable vector,
-if the value of ``idx`` exceeds the runtime length of the vector, the result
+``elt``. If ``idx`` exceeds the length of ``val``, the result
is a :ref:`poison value <poisonvalues>`.
Example:
@@ -8240,7 +8221,6 @@
::
<result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask> ; yields <m x <ty>>
- <result> = shufflevector <vscale x n x <ty>> <v1>, <vscale x n x <ty>> v2, <vscale x m x i32> <mask> ; yields <vscale x m x <ty>>
Overview:
"""""""""
@@ -8272,10 +8252,6 @@
result is undef. If the shuffle mask selects an undef element from one
of the input vectors, the resulting element is undef.
-For scalable vectors, the only valid mask values at present are
-``zeroinitializer`` and ``undef``, since we cannot write all indices as
-literals for a vector with a length unknown at compile time.
-
Example:
""""""""