[PATCH] D107002: [PowerPC] Implement XL compatibility builtin __addex

Victor Huang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 30 11:51:19 PDT 2021


NeHuang added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:3426
+  case PPC::BI__builtin_ppc_addex: {
+    if (SemaFeatureCheck(*this, TheCall, "power9-vector",
+                         diag::err_ppc_builtin_only_on_arch, "9") ||
----------------
I think we start using `isa-v30-instructions` for pwr9 only (or later process)  in `SemaFeatureCheck`


================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-pwr9-warning.c:4
+// RUN:   -verify %s
+
+extern unsigned long long ull;
----------------
can we also add the run lines for 64 bit LE Linux, 64 bit AIX and 32 bit AIX?  Will also need `#ifdef __PPC64__` for the test case. 


================
Comment at: llvm/test/CodeGen/PowerPC/builtins-ppc-xlcompat-pwr9-64bit.ll:44
+
+define dso_local i64 @call_addex_1(i64 %a, i64 %b) {
+; CHECK-LABEL: call_addex_1:
----------------
This test case is identical as `call_addex_0`  The unsigned long long and signed long long scenarios produce identical IR and we should only keep one test case here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107002



More information about the cfe-commits mailing list