[llvm] [GlobalIsel] Import vscale (PR #88240)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 12 06:23:02 PDT 2024
Thorsten =?utf-8?q?Schütt?= <schuett at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/88240 at github.com>
================
@@ -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);
----------------
arsenm wrote:
Move this into a buildVScale in the MIRBuilder?
https://github.com/llvm/llvm-project/pull/88240
More information about the llvm-commits
mailing list