[llvm] [LLVM][IR] Add textual shorthand for specifying constant vector splats. (PR #74620)
Paul Walker via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 6 08:24:03 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)``".
----------------
paulwalker-arm wrote:
Am I being too adventurous here by suggesting this be the preferred syntax?
https://github.com/llvm/llvm-project/pull/74620
More information about the llvm-commits
mailing list