[llvm] [VPlan] Add VPIRAttributes; use for VPWidenCallRecipe. (PR #207075)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 14:02:52 PDT 2026


================
@@ -2121,6 +2123,101 @@ void VPIRMetadata::print(raw_ostream &O, VPSlotTracker &SlotTracker) const {
 }
 #endif
 
+VPIRAttributes::VPIRAttributes(CallInst &CI, const Function &Variant) {
+  LLVMContext &Ctx = CI.getContext();
+  AttributeList ScalarAttrs = CI.getAttributes();
+  AttributeList VariantAttrs = Variant.getAttributes();
+  FunctionType *VariantTy = Variant.getFunctionType();
+
+  static constexpr Attribute::AttrKind Allowed[] = {
+      Attribute::Alignment, Attribute::NonNull, Attribute::NoFPClass,
+      Attribute::Range};
----------------
fhahn wrote:

The list should help to keep things simpler initially. For example, some attributes are only valid on scalar arguments, not widened ones. This intentionally excludes UB causing attributes, which may be problematic, for example if we mask the call and execute it for iterations the original loop did not execute.

Added a TODO to support additional attributes

https://github.com/llvm/llvm-project/pull/207075


More information about the llvm-commits mailing list