[PATCH] D105360: [PowerPC] Fix popcntb XL Compat Builtin for 32bit

Victor Huang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 5 09:16:38 PDT 2021


NeHuang added inline comments.


================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-sync.c:240
+void test_icbt() {
+  __icbt(c);
 }
----------------
>From the document, `__icbt` only valid when -qarch is set to target pwr8 or higher processors. It looks like target cpu sema checking and error case are missing. If you are working on another patch to fix it, please put fixme comments for the __icbt implementation and test case in this patch. 


================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-sync.c:467
+//
+void test_builtin_ppc_icbt() {
+  __builtin_ppc_icbt(c);
----------------
same as above.


================
Comment at: llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-sync-64.ll:83
+  %0 = load i8*, i8** %a, align 8
+  call void @llvm.ppc.icbt(i8* %0)
+; CHECK: icbt 0, 0, 3
----------------
same here, pwr8 (or later processors) only


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105360



More information about the cfe-commits mailing list