[clang] [llvm] [PowerPC] Add support for -mcpu=pwr11 / -mtune=pwr11 (PR #97760)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 4 12:38:29 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff d1dc4169838381688a74f245cdaedbe9fce13848 cbcbf4cd1a0e07986268955e598047efdd069dcc -- clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h clang/lib/Driver/ToolChains/Arch/PPC.cpp clang/test/Misc/target-invalid-cpu-note.c clang/test/Preprocessor/init-ppc64.c llvm/lib/Target/PowerPC/PPCISelLowering.cpp llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp llvm/lib/TargetParser/Host.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp
index 78ee7fa7fc..19363beabf 100644
--- a/clang/lib/Basic/Targets/PPC.cpp
+++ b/clang/lib/Basic/Targets/PPC.cpp
@@ -622,8 +622,8 @@ bool PPCTargetInfo::initFeatureMap(
     addP10SpecificFeatures(Features);
   }
 
-  // Power11 includes all the same features as Power10 plus any features specific
-  // to the Power11 core.
+  // Power11 includes all the same features as Power10 plus any features
+  // specific to the Power11 core.
   if (CPU == "pwr11" || CPU == "power11") {
     initFeatureMap(Features, Diags, "pwr10", FeaturesVec);
     addP11SpecificFeatures(Features);
diff --git a/clang/lib/Basic/Targets/PPC.h b/clang/lib/Basic/Targets/PPC.h
index c1f0cfc148..b57f855c63 100644
--- a/clang/lib/Basic/Targets/PPC.h
+++ b/clang/lib/Basic/Targets/PPC.h
@@ -172,10 +172,10 @@ public:
                          ArchDefinePwr5x | ArchDefinePwr5 | ArchDefinePwr4 |
                          ArchDefinePpcgr | ArchDefinePpcsq)
               .Case("future",
-                     ArchDefineFuture | ArchDefinePwr11 | ArchDefinePwr10 |
-                         ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 |
-                         ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 |
-                         ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq)
+                    ArchDefineFuture | ArchDefinePwr11 | ArchDefinePwr10 |
+                        ArchDefinePwr9 | ArchDefinePwr8 | ArchDefinePwr7 |
+                        ArchDefinePwr6 | ArchDefinePwr5x | ArchDefinePwr5 |
+                        ArchDefinePwr4 | ArchDefinePpcgr | ArchDefinePpcsq)
               .Cases("8548", "e500", ArchDefineE500)
               .Default(ArchDefineNone);
     }

``````````

</details>


https://github.com/llvm/llvm-project/pull/97760


More information about the cfe-commits mailing list