Skip to content

Commit 61a9e50

Browse files
committed
Always check hasVectorMaskArgument
1 parent 468c050 commit 61a9e50

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

llvm/lib/IR/RuntimeLibcalls.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,7 @@ RuntimeLibcallsInfo::getFunctionTy(LLVMContext &Ctx, const Triple &TT,
223223

224224
Type *ScalarTy = IsF32 ? Type::getFloatTy(Ctx) : Type::getDoubleTy(Ctx);
225225
unsigned EC = IsF32 ? 4 : 2;
226-
227-
Type *VecTy =
228-
IsScalable ? static_cast<Type *>(ScalableVectorType::get(ScalarTy, EC))
229-
: static_cast<Type *>(FixedVectorType::get(ScalarTy, EC));
226+
VectorType *VecTy = VectorType::get(ScalarTy, EC, IsScalable);
230227

231228
for (Attribute::AttrKind Attr : CommonFnAttrs)
232229
FuncAttrBuilder.addAttribute(Attr);
@@ -245,8 +242,8 @@ RuntimeLibcallsInfo::getFunctionTy(LLVMContext &Ctx, const Triple &TT,
245242

246243
PointerType *PtrTy = PointerType::get(Ctx, 0);
247244
SmallVector<Type *, 4> ArgTys = {VecTy, PtrTy};
248-
if (IsScalable && hasVectorMaskArgument(LibcallImpl))
249-
ArgTys.push_back(ScalableVectorType::get(Type::getInt1Ty(Ctx), EC));
245+
if (hasVectorMaskArgument(LibcallImpl))
246+
ArgTys.push_back(VectorType::get(Type::getInt1Ty(Ctx), EC, IsScalable));
250247

251248
return {FunctionType::get(VecTy, ArgTys, false), Attrs};
252249
}

0 commit comments

Comments
 (0)