[PATCH] D129838: [LoongArch] Optimize the atomic store with amswap_db.[w/d]

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 19 00:43:39 PDT 2022


SixWeining added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:1741
+    return isa<LoadInst>(I) || isa<StoreInst>(I);
+  } else {
+    unsigned Size = 0;
----------------
No need to use `else` after `return`.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:1742-1744
+    unsigned Size = 0;
+    if (isa<StoreInst>(I))
+      Size = I->getOperand(0)->getType()->getIntegerBitWidth();
----------------
Size = isa<StoreInst>(I) ? I->getOperand(0)->getType()->getIntegerBitWidth() : 0;


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129838/new/

https://reviews.llvm.org/D129838



More information about the llvm-commits mailing list