[PATCH] D107138: [PowerPC] Implement cmplxl builtins

Nemanja Ivanovic via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 7 09:46:00 PDT 2021


nemanjai added inline comments.


================
Comment at: clang/test/CodeGen/builtins-ppc-xlcompat-complex.c:1
+// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-unknown \
+// RUN:   -emit-llvm %s -o - -target-cpu pwr7 | FileCheck %s
----------------
Conanap wrote:
> NeHuang wrote:
> > NeHuang wrote:
> > > `// REQUIRES: powerpc-registered-target`
> > Question: why do we need `-O2` for this builtin?
> > 
> it's not required, but removes a lot of the extra load and stores that make the test cases longer unnecessarily. I can change it to O1 if preferred.
I prefer that front end tests should test what the front end does. The front end does not perform optimizations, the optimizer does. So the front end tests should not include optimization options (even though I do realize that adding -O<N> reduces the size of the produced code).
There is no need to add unnecessary churn in front end tests if the optimizer changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107138



More information about the cfe-commits mailing list