shchenz added a comment. > This patch turns on support for CR bit accesses for Power8 and above. The > reason why CR bits are turned on as the default for Power8 and above is that > because later architectures make use of builtins and instructions that > require CR bit accesses (such as the use of setbc in the vector string > isolate predicate and bcd builtins on Power10).
Maybe we also can add some comments in `docs/ClangCommandLineReference.rst` to explicitly say that `-mcrbits` will be default to on when PowerPC arch is no smaller than 8. I believe some cr-bit operations also exist on Power7 or even Power6? ================ Comment at: clang/lib/Basic/Targets/PPC.cpp:519 .Default(false); + Features["crbits"] = llvm::StringSwitch<bool>(CPU) + .Case("ppc64le", true) ---------------- If we set the `+crbits` by the arch name, do we still need the customization (Turn on crbits for O2 and above) in `computeFSAdditions()`? ================ Comment at: clang/test/Driver/ppc-crbits.cpp:50 +// RUN: %clang -target powerpc64le-unknown-linux-gnu -mcpu=pwr7 -mno-crbits \ +// RUN: -emit-llvm -S %s -o - | FileCheck %s --check-prefix=HAS-NOCRBITS + ---------------- Do we need some cases for AIX? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124060/new/ https://reviews.llvm.org/D124060 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits