[llvm] [VPlan] Populate and use VPIRMetadata from VPInstructions (NFC) (PR #167253)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 01:25:30 PST 2025
================
@@ -228,6 +234,18 @@ void PlainCFGBuilder::createVPInstructionsForVPBB(VPBasicBlock *VPBB,
VPPredToIncomingValue.lookup(Pred->getExitingBasicBlock()));
}
} else {
+ // Build VPIRMetadata from the instruction and add loop versioning
+ // metadata for loads and stores.
+ VPIRMetadata MD(*Inst);
+ if (isa<LoadInst, StoreInst>(Inst) && LVer) {
+ const auto &[AliasScopeMD, NoAliasMD] =
+ LVer->getNoAliasMetadataFor(Inst);
+ if (AliasScopeMD)
+ MD.addMetadata(LLVMContext::MD_alias_scope, AliasScopeMD);
----------------
david-arm wrote:
Is this still NFC? Where were we adding this metadata before your patch?
https://github.com/llvm/llvm-project/pull/167253
More information about the llvm-commits
mailing list