[PATCH] D81816: [PowerPC] Add support for vector bool __int128 for Power10

Ahsan Saghir via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 16 11:00:14 PDT 2020


saghir marked 4 inline comments as done.
saghir added inline comments.


================
Comment at: clang/lib/Sema/DeclSpec.cpp:1155
+      // TODO: Update comment with correct Programming Interface Manual
+      // version once it is available. __int128 has also been added
+      // to vector bool for Power10.
----------------
lei wrote:
> Not sure what you mean here.
Earlier comment had the Programming Interface Manual version number (PIM 2.1); asserting only char/int were valid with vector bool. 
This patch adds __int128, so the comment needs to be updated with the latest version of the document once it is available.


================
Comment at: clang/test/Parser/altivec-bool-128.c:2
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -target-feature +altivec -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -target-feature +altivec -fsyntax-only -verify %s
+
----------------
lei wrote:
> test for `-mcpu=pwr10 -target-feature -power10-vector` and `-mcpu=pwr10 -target-feature -vsx`
> same for cxx-altivec-bool-128.cpp
This test basically checks that `VSX` needs to be enabled to have `vector bool __int128` type work.


================
Comment at: clang/test/Parser/p10-vector-bool-128.c:1
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -target-feature +altivec -target-feature +vsx -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -target-feature +altivec -target-feature +vsx -fsyntax-only -verify %s
----------------
amyk wrote:
> Just curious but does the RUN line require `pwr10`?
Added `pwr10`.


================
Comment at: clang/test/Parser/p10-vector-bool-128.c:2
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -target-feature +altivec -target-feature +vsx -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -target-feature +altivec -target-feature +vsx -fsyntax-only -verify %s
+// expected-no-diagnostics
----------------
lei wrote:
> add run line for feature `cpu=pwr10 +power10-vector`
Added `pwr10`.
`vector bool __int128` type should work with `pwr10` and `vsx` enabled, `power10-vector` is not needed explicitly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81816





More information about the cfe-commits mailing list