[llvm] [X86][NF] Switch the order of Inst and &Target.getInstruction(NewRec) (PR #130739)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 11 22:46:09 PDT 2025


================
@@ -275,27 +275,27 @@ void X86InstrMappingEmitter::emitNFTransformTable(
     const Record *Rec = Inst->TheDef;
     if (!isInteresting(Rec))
       continue;
-    std::string Name = Rec->getName().str();
-    auto Pos = Name.find("_NF");
-    if (Pos == std::string::npos)
+    StringRef Name = Rec->getName();
+    auto *NewRec = Records.getDef(Name.str() + "_NF");
+    if (!NewRec && Name.consume_back("_ND"))
----------------
phoebewang wrote:

Done.

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


More information about the llvm-commits mailing list