[llvm] bafda89 - [X86] Use generic CPU tuning when tune-cpu is empty (#83631)

via llvm-commits llvm-commits at lists.llvm.org
Sun May 26 18:39:16 PDT 2024


Author: AtariDreams
Date: 2024-05-26T21:39:12-04:00
New Revision: bafda89a0944d947fc4b3b5663185e07a397ac30

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

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

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 c2e6ddd7e7fa2..bac8d3a29ec06 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 = "i586"; // FIXME: "generic" is more modern than llc tests expect.
+    TuneCPU = HasX86_64 ? "generic" : "i586";
 
   std::string FullFS = X86_MC::ParseX86Triple(TargetTriple);
   assert(!FullFS.empty() && "Failed to parse X86 triple");


        


More information about the llvm-commits mailing list