[llvm] [LLVM][IR] Add textual shorthand for specifying constant vector splats. (PR #74620)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 7 06:19:17 PST 2023
================
@@ -4299,6 +4299,11 @@ constants and smaller complex constants.
"``< i32 42, i32 11, i32 74, i32 100 >``". Vector constants
must have :ref:`vector type <t_vector>`, and the number and types of
elements must match those specified by the type.
+
+ When creating a vector whose elements have the same constant value, the
+ prefered syntax is ``splat (<Ty> Val)``. For example: "``splat (i32 11)``".
----------------
nikic wrote:
```suggestion
preferred syntax is ``splat (<Ty> Val)``. For example: "``splat (i32 11)``".
```
https://github.com/llvm/llvm-project/pull/74620
More information about the llvm-commits
mailing list