================
@@ -98,6 +99,13 @@ class ConstantInt final : public ConstantData {
   /// value. Otherwise return a ConstantInt for the given value.
   static Constant *get(Type *Ty, uint64_t V, bool IsSigned = false);
 
+  /// WARNING: Incomplete support, do not use. These methods exist for early
+  /// prototyping, for most use cases ConstantInt::get() should be used.
+  /// Return a ConstantInt with a splat of the given value.
+  static ConstantInt *getSplat(LLVMContext &Context, ElementCount EC,
+                               const APInt &V);
+  static ConstantInt *getSplat(const VectorType *Ty, const APInt &V);
----------------
nikic wrote:

I think this isn't the right way to phase in the change. I think the `splat` 
syntax should just return whatever `ConstantVector::getSplat()` produces, and 
what that produces can be controlled by the opt flags you have introduced.

That means that the splat syntax becomes usable right away as a short-hand for 
producing the representations we currently use, and will switch to producing 
plain ConstantInt/ConstantFP once the flag is flipped (or in tests that 
explicitly flip it).

https://github.com/llvm/llvm-project/pull/74502
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to