[llvm] [VPlan] Add VPInstruction::Intrinsic opcode, use for scalar intrinsics. (PR #207541)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 6 07:33:45 PDT 2026
================
@@ -435,10 +435,22 @@ class VPBuilder {
new VPInstructionWithType(Opcode, Op, ResultTy, Flags, Metadata, DL));
}
- /// Create a VScale VPInstruction.
+ /// Create a scalar call to the intrinsic \p IntrinsicID with \p Operands, and
+ /// result type \p ResultTy
+ VPInstruction *createScalarIntrinsic(Intrinsic::ID IntrinsicID,
+ ArrayRef<VPValue *> Operands,
+ Type *ResultTy, DebugLoc DL) {
+ VPlan &Plan = getPlan();
+ SmallVector<VPValue *, 2> Ops(Operands);
+ Ops.push_back(Plan.getConstantInt(32, IntrinsicID));
----------------
fhahn wrote:
I think that should be fine, updated thanks!
https://github.com/llvm/llvm-project/pull/207541
More information about the llvm-commits
mailing list