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

Gong LingQin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 16 00:37:54 PST 2022


gonglingqin added inline comments.


================
Comment at: clang/include/clang/Basic/BuiltinsLoongArch.def:20-23
 TARGET_BUILTIN(__builtin_loongarch_dbar, "vIUi", "nc", "")
+TARGET_BUILTIN(__builtin_loongarch_ibar, "vIUi", "nc", "")
+TARGET_BUILTIN(__builtin_loongarch_break, "vIUi", "nc", "")
+TARGET_BUILTIN(__builtin_loongarch_syscall, "vIUi", "nc", "")
----------------
arsenm wrote:
> These all have I parameters but the underlying intrinsic wasn't marked with immarg 
Thanks for checking, I'll add constraints.


================
Comment at: clang/test/CodeGen/LoongArch/intrinsic-error.c:21
+  __builtin_loongarch_ibar(-1); // expected-error {{argument value 4294967295 is outside the valid range [0, 32767]}}
+}
+
----------------
arsenm wrote:
> Should also test non-constant cases 
Thanks, I'll add the test cases.


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