[clang] [llvm] Add AMO load with Compare and Swap Not Equal (PR #178061)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 23 07:19:11 PDT 2026


================
@@ -1729,6 +1729,27 @@ void PPCAsmPrinter::emitInstruction(const MachineInstr *MI) {
     EmitToStreamer(*OutStreamer, MCInstBuilder(PPC::EnforceIEIO));
     return;
   }
+  case PPC::BL8:
+  case PPC::BL8_NOP: {
+    const MachineOperand &MO = MI->getOperand(0);
+    if (MO.isSymbol()) {
+      StringRef Name = MO.getSymbolName();
+      Name.consume_front(".");
+      Name.consume_back("[PR]");
+      bool IsLWAT = Name == "__lwat_csne_pseudo";
+      bool IsLDAT = Name == "__ldat_csne_pseudo";
+      if (IsLWAT || IsLDAT) {
----------------
nikic wrote:

Why does this this do special name-based(!) handling during asm printing, rather than using a separate ISD opcode for these?

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


More information about the cfe-commits mailing list