[llvm] Revert "[X86] Use generic CPU tuning when tune-cpu is empty" (PR #93436)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 26 20:35:46 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-x86

Author: Phoebe Wang (phoebewang)

<details>
<summary>Changes</summary>

Reverts llvm/llvm-project#<!-- -->83631

Using `HasX86_64` is incorrect.

---
Full diff: https://github.com/llvm/llvm-project/pull/93436.diff


1 Files Affected:

- (modified) llvm/lib/Target/X86/X86Subtarget.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index bac8d3a29ec06..c2e6ddd7e7fa2 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -252,7 +252,7 @@ void X86Subtarget::initSubtargetFeatures(StringRef CPU, StringRef TuneCPU,
     CPU = "generic";
 
   if (TuneCPU.empty())
-    TuneCPU = HasX86_64 ? "generic" : "i586";
+    TuneCPU = "i586"; // FIXME: "generic" is more modern than llc tests expect.
 
   std::string FullFS = X86_MC::ParseX86Triple(TargetTriple);
   assert(!FullFS.empty() && "Failed to parse X86 triple");

``````````

</details>


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


More information about the llvm-commits mailing list