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

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


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

Reverts llvm/llvm-project#83631

Using `HasX86_64` is incorrect.

>From f350760c1c8f7e7b7c7f858aacc1465a03a1ed83 Mon Sep 17 00:00:00 2001
From: Phoebe Wang <phoebe.wang at intel.com>
Date: Mon, 27 May 2024 11:34:21 +0800
Subject: [PATCH] Revert "[X86] Use generic CPU tuning when tune-cpu is empty
 (#83631)"

This reverts commit bafda89a0944d947fc4b3b5663185e07a397ac30.
---
 llvm/lib/Target/X86/X86Subtarget.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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");



More information about the llvm-commits mailing list