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

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


Author: Phoebe Wang
Date: 2024-05-27T11:35:21+08:00
New Revision: cbd8031baa62f20d8513f084104180f9d49d763d

URL: https://github.com/llvm/llvm-project/commit/cbd8031baa62f20d8513f084104180f9d49d763d
DIFF: https://github.com/llvm/llvm-project/commit/cbd8031baa62f20d8513f084104180f9d49d763d.diff

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

Reverts llvm/llvm-project#83631

Using `HasX86_64` is incorrect.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86Subtarget.cpp

Removed: 
    


################################################################################
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