[PATCH] D138094: [LoongArch] Add intrinsics for ibar, break and syscall

Lu Weining via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 18:49:58 PST 2022


SixWeining added inline comments.


================
Comment at: llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp:603
   case Intrinsic::loongarch_dbar: {
-    SDValue Op0 = Op.getOperand(0);
-    SDValue Op2 = Op.getOperand(2);
-    if (!isa<ConstantSDNode>(Op2)) {
-      DAG.getContext()->emitError("argument to '__builtin_loongarch_dbar' must "
-                                  "be a constant integer");
-      return Op.getOperand(0);
-    }
+    Name = "__builtin_loongarch_dbar";
     unsigned Imm = cast<ConstantSDNode>(Op2)->getZExtValue();
----------------
This string can be inlined into line 606. Then line 595 can be removed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138094



More information about the llvm-commits mailing list