[llvm] [SandboxVec][LoadStoreVec] Support constant vectors of mixed types (PR #224890)

Vasileios Porpodas via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 14:51:31 PDT 2026


================
@@ -82,42 +83,108 @@ LoadInst *LoadStoreVec::createVectorLoad(BndlRef<Instruction *> Loads) {
   return LoadInst::create(Ty, LdPtr, LdAlign, LdWhereIt, *Ctx, "VecIinitL");
 }
 
-Value *LoadStoreVec::createConstantVector(BndlRef<Value *> Operands) {
-  SmallVector<Constant *, 8> Constants;
-  Constants.reserve(Operands.size());
+Constant *LoadStoreVec::createEquivalentConstantWithType(Constant *C,
----------------
vporpo wrote:

I just noticed that this will not always create a new constant (e.g., if SrcTy == DestTy), so a better name would be `getEquivalentConstantWithType()`.

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


More information about the llvm-commits mailing list