[PATCH] D92935: Introduce support for PowerPC devices with an Embedded Floating-point APU version 2 (efpu2)

Michael Kiausch via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 28 07:57:30 PDT 2021


kiausch added inline comments.


================
Comment at: llvm/test/CodeGen/PowerPC/spe.ll:2
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -verify-machineinstrs < %s -mtriple=powerpc-unknown-linux-gnu \
-; RUN:          -mattr=+spe |  FileCheck %s
+; RUN: split-file %s %t
+; RUN: llc -verify-machineinstrs < %t/single.ll -mtriple=powerpc-unknown-linux-gnu \
----------------
jrtc27 wrote:
> jrtc27 wrote:
> > jrtc27 wrote:
> > > This breaks being able to run update_llc_test_checks.py without first running the test itself to generate the files
> > In fact it breaks it completely, update_llc_test_checks.py doesn't support the %t substitutions, and even if it did it's unclear what that even means; should it update the CHECK lines in the file with the RUN lines or the files being used by FileCheck?
> > 
> > This should have just been manually split.
> Most of this is also entirely unnecessary if you use --check-prefixes=CHECK,SPE/EFPU2; update_llc_test_checks.py will merge CHECK lines when possible. The only thing that needs splitting is the hwdouble test, by just putting it in a separate file (or using sed to preprocess the file so SPE sees the test uncommented and EFPU2 sees the test commented out, but that seems unnecessary, though does work). I'll write a patch for the former.
In the first revison of this patch the tests were split into two separate files for SPE and EFPU2 but this was legitimately criticised for duplicating the single precision tests. This is why I tried to use the split-file feature.
My intention was to
- run the single.ll part on both, spe and efpu2
- run the double.ll part on both, spe and efpu2, but with different assertions. When using efpu2 there are no hardware double instructions generated but library calls, and I just wanted to check that in this case the correct calls were genereated. The assertions for these cases were hand-crafted because I was not really able to get the update_llc_test_checks.py to work. The comment above came from the original test file.
- the hwdouble.ll part needs to be excluded because this uses an assembly instruction which is not available on efpu2 devices.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92935



More information about the cfe-commits mailing list