[llvm] [VPlan] Populate and use VPIRMetadata from VPInstructions (NFC) (PR #167253)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 13:42:00 PST 2025
================
@@ -1453,9 +1454,12 @@ class LLVM_ABI_FOR_TEST VPWidenRecipe : public VPRecipeWithIRFlags,
: VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, Flags, DL),
VPIRMetadata(Metadata), Opcode(Opcode) {}
- VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands)
- : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, I), VPIRMetadata(I),
- Opcode(I.getOpcode()) {}
+ VPWidenRecipe(Instruction &I, ArrayRef<VPValue *> Operands,
+ const VPIRMetadata &Metadata, DebugLoc DL)
+ : VPRecipeWithIRFlags(VPDef::VPWidenSC, Operands, VPIRFlags(I), DL),
----------------
fhahn wrote:
I kept changed this back to use the variant with Instruction for now, as it is unrelated to the patch. I'll soon post a follow-up patch, that does something similar as this patch for VPIRFlags, removing retrieving flags from the underlying instruction.
(using the metadata/flags from the underlying instruction can cause subtle mis-compiles, if the flags were already dropped, then we could add them back by accident when converting recipes)
https://github.com/llvm/llvm-project/pull/167253
More information about the llvm-commits
mailing list