Skip to content

Commit d3d9b18

Browse files
committed
Refine constructor of VPWidenIntrinsicRecipe
1 parent 640e28d commit d3d9b18

File tree

1 file changed

+2
-11
lines changed
  • llvm/lib/Transforms/Vectorize

1 file changed

+2
-11
lines changed

llvm/lib/Transforms/Vectorize/VPlan.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,17 +1704,8 @@ class VPWidenIntrinsicRecipe : public VPRecipeWithIRFlags {
17041704
VPWidenIntrinsicRecipe(Intrinsic::ID VectorIntrinsicID,
17051705
std::initializer_list<VPValue *> CallArguments,
17061706
Type *Ty, DebugLoc DL = {})
1707-
: VPRecipeWithIRFlags(VPDef::VPWidenIntrinsicSC, CallArguments),
1708-
VectorIntrinsicID(VectorIntrinsicID), ResultTy(Ty) {
1709-
LLVMContext &Ctx = Ty->getContext();
1710-
AttributeList Attrs = Intrinsic::getAttributes(Ctx, VectorIntrinsicID);
1711-
MemoryEffects ME = Attrs.getMemoryEffects();
1712-
MayReadFromMemory = ME.onlyWritesMemory();
1713-
MayWriteToMemory = ME.onlyReadsMemory();
1714-
MayHaveSideEffects = MayWriteToMemory ||
1715-
Attrs.hasFnAttr(Attribute::NoUnwind) ||
1716-
!Attrs.hasFnAttr(Attribute::WillReturn);
1717-
}
1707+
: VPWidenIntrinsicRecipe(VectorIntrinsicID,
1708+
ArrayRef<VPValue *>(CallArguments), Ty, DL) {}
17181709

17191710
~VPWidenIntrinsicRecipe() override = default;
17201711

0 commit comments

Comments
 (0)