diff options
Diffstat (limited to 'llvm/lib/IR/Constants.cpp')
-rw-r--r-- | llvm/lib/IR/Constants.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp index f777b1b..a536711 100644 --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -1415,11 +1415,11 @@ Constant *ConstantVector::getSplat(ElementCount EC, Constant *V) { else if (isa<UndefValue>(V)) return UndefValue::get(VTy); - Type *I32Ty = Type::getInt32Ty(VTy->getContext()); + Type *IdxTy = Type::getInt64Ty(VTy->getContext()); // Move scalar into vector. Constant *PoisonV = PoisonValue::get(VTy); - V = ConstantExpr::getInsertElement(PoisonV, V, ConstantInt::get(I32Ty, 0)); + V = ConstantExpr::getInsertElement(PoisonV, V, ConstantInt::get(IdxTy, 0)); // Build shuffle mask to perform the splat. SmallVector<int, 8> Zeros(EC.getKnownMinValue(), 0); // Splat. |