[PATCH] D107647: [PowerPC] MMA - Add __builtin_vsx_build_pair and __builtin_mma_build_acc builtins
Lei Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 26 08:30:48 PDT 2021
lei added inline comments.
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15833
+ // without the need for the programmer to swap operands.
+ if (IsLE) {
+ SmallVector<Value *, 4> RevOps;
----------------
doesn't look like we need the interm var `IsLE`. Just use the call directly within the if stmt.
```
if (getTarget().isLittleEndian()) {
```
================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:15835-15837
+ unsigned NumVecs = 2;
+ if (BuiltinID == PPC::BI__builtin_mma_build_acc)
+ NumVecs = 4;
----------------
```
unsigned NumVecs = (BuiltinID == PPC::BI__builtin_mma_build_acc) ? 4 : 2;
================
Comment at: clang/test/CodeGen/builtins-ppc-pair-mma.c:2
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
// RUN: %clang_cc1 -O3 -triple powerpc64le-unknown-unknown -target-cpu future -emit-llvm %s -o - | FileCheck %s
----------------
future -> pwr10
We need to add BE tests.
================
Comment at: clang/test/Sema/ppc-pair-mma-types.c:2
// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -fsyntax-only \
// RUN: -target-cpu future %s -verify
----------------
this should be `-target-cpu pwer10` now.
================
Comment at: clang/test/Sema/ppc-pair-mma-types.c:2
// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -fsyntax-only \
// RUN: -target-cpu future %s -verify
----------------
lei wrote:
> this should be `-target-cpu pwer10` now.
Please add BE testing.
================
Comment at: clang/test/Sema/ppc-pair-mma-types.c:265
+ __builtin_mma_xvf64ger(&vq, vp3, vc);
+ *vpp = vp3;
+}
----------------
This looks like a dup of `testVPLocal()`. Why not just add the new call line to that function right below the call to the deprecated function?
================
Comment at: clang/test/SemaCXX/ppc-pair-mma-types.cpp:2
// RUN: %clang_cc1 -triple powerpc64le-unknown-unknown -fsyntax-only \
// RUN: -fcxx-exceptions -target-cpu future %s -verify
----------------
please update to pwr10
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107647/new/
https://reviews.llvm.org/D107647
More information about the cfe-commits
mailing list