[llvm] [LLVM][IR] Add textual shorthand for specifying constant vector splats. (PR #74620)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 02:58:44 PST 2023


================
@@ -5824,6 +5839,17 @@ bool LLParser::convertValIDToValue(Type *Ty, ValID &ID, Value *&V,
                                "' but expected '" + getTypeString(Ty) + "'");
     V = ID.ConstantVal;
     return false;
+  case ValID::t_ConstantSplat:
+    if (!Ty->isVectorTy())
+      return error(ID.Loc, "vector constant must have vector type");
----------------
nikic wrote:

If you feel like it, we could test these error conditions, but I'm not going to insist...

https://github.com/llvm/llvm-project/pull/74620


More information about the llvm-commits mailing list