@@ -14504,7 +14504,7 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
14504
14504
14505
14505
// Unaligned nontemporal store of the scalar value.
14506
14506
StoreInst *SI = Builder.CreateDefaultAlignedStore(Src, BC);
14507
- SI->setMetadata(CGM.getModule().getMDKindID("nontemporal") , Node);
14507
+ SI->setMetadata(llvm::LLVMContext::MD_nontemporal , Node);
14508
14508
SI->setAlignment(llvm::Align(1));
14509
14509
return SI;
14510
14510
}
@@ -20226,8 +20226,7 @@ Value *CodeGenFunction::EmitRISCVBuiltinExpr(unsigned BuiltinID,
20226
20226
LoadInst *Load = Builder.CreateLoad(
20227
20227
Address(Ops[0], ResTy, CharUnits::fromQuantity(Width / 8)));
20228
20228
20229
- Load->setMetadata(CGM.getModule().getMDKindID("nontemporal"),
20230
- NontemporalNode);
20229
+ Load->setMetadata(llvm::LLVMContext::MD_nontemporal, NontemporalNode);
20231
20230
Load->setMetadata(CGM.getModule().getMDKindID("riscv-nontemporal-domain"),
20232
20231
RISCVDomainNode);
20233
20232
@@ -20246,8 +20245,7 @@ Value *CodeGenFunction::EmitRISCVBuiltinExpr(unsigned BuiltinID,
20246
20245
Ops[0], llvm::PointerType::getUnqual(Ops[1]->getType()), "cast");
20247
20246
20248
20247
StoreInst *Store = Builder.CreateDefaultAlignedStore(Ops[1], BC);
20249
- Store->setMetadata(CGM.getModule().getMDKindID("nontemporal"),
20250
- NontemporalNode);
20248
+ Store->setMetadata(llvm::LLVMContext::MD_nontemporal, NontemporalNode);
20251
20249
Store->setMetadata(CGM.getModule().getMDKindID("riscv-nontemporal-domain"),
20252
20250
RISCVDomainNode);
20253
20251
0 commit comments