[llvm] [LLVM][IR] Add native vector support to ConstantInt & ConstantFP. (PR #74502)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 08:49:35 PST 2024
================
@@ -885,6 +901,26 @@ ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt &V) {
return Slot.get();
}
+// Get a ConstantInt vector with each lane set to the same APInt.
+ConstantInt *ConstantInt::get(LLVMContext &Context, ElementCount EC,
+ const APInt &V) {
----------------
nikic wrote:
If you implement them this way, you need to make the APIs private. Having this as a public API means that it should return old splat representation if the relevant options are disabled.
https://github.com/llvm/llvm-project/pull/74502
More information about the llvm-commits
mailing list