[PATCH] D114540: Big-endian version of vpermxor

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 24 08:28:05 PST 2021


nemanjai added a comment.

Please also add a test for this builtin to the front end test `clang/test/CodeGen/builtins-ppc-crypto.c`



================
Comment at: llvm/lib/Target/PowerPC/PPCInstrVSX.td:2499
                                              (COPY_TO_REGCLASS $c, VSRC))))>;
+  def : Pat<(v16i8 (int_ppc_altivec_crypto_vpermxor_be v16i8:$a,
+                                                    v16i8:$b, v16i8:$c)),
----------------
Although it would be redundant, it is not invalid to use this builtin/intrinsic in BE compilations. As such, please move this to a block that has only the
`[HasVSX, HasP8Altivec]` predicates as the desired code is the same for LE/BE.


================
Comment at: llvm/test/CodeGen/PowerPC/crypto_bifs_be.ll:9
+entry:
+  %a = alloca <16 x i8>, align 16
+  %b = alloca <16 x i8>, align 16
----------------
Please clean up this test case a bit:
- Run `opt --passes="default<O2>"` on it to clean up the unnecessary code
- Remove the attributes
- The 755 permissions on the test case are unusual
- Produce the CHECK's automatically using `$LLVM_SRC/utils/update_llc_test_checks.py`
- Add a BE invocation (either the P8 or the P9 can just use the `powerpc64-unknown-linux-gnu` triple)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114540



More information about the llvm-commits mailing list