[llvm] [GlobalIsel] Import vscale (PR #88240)
Thorsten Schütt via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 06:35:54 PDT 2024
================
@@ -2550,6 +2550,15 @@ bool IRTranslator::translateKnownIntrinsic(const CallInst &CI, Intrinsic::ID ID,
MIRBuilder.buildInstr(TargetOpcode::G_RESET_FPMODE, {}, {});
return true;
}
+ case Intrinsic::vscale: {
+ LLT DstTy = getLLTForType(*CI.getType(), *DL);
+ auto IntN = IntegerType::get(MF->getFunction().getContext(),
+ DstTy.getScalarSizeInBits());
+ ConstantInt *CInt = ConstantInt::get(IntN, 1);
+ MIRBuilder.buildInstr(TargetOpcode::G_VSCALE, {getOrCreateVReg(CI)}, {})
+ .addCImm(CInt);
----------------
tschuett wrote:
Done.
https://github.com/llvm/llvm-project/pull/88240
More information about the llvm-commits
mailing list