[llvm] 13fe038 - [MachineSink][AArch64] Enable sink-and-fold by default (#72132)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 16 04:13:01 PST 2023


Author: Momchil Velikov
Date: 2023-11-16T12:12:56Z
New Revision: 13fe0386454d2f4c9bad4e20fc59699d1a49b8cf

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

LOG: [MachineSink][AArch64] Enable sink-and-fold by default (#72132)

Enable the optimisation by default for AArch64 after a compile time
regressoin fix in e8209b2486d8

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    llvm/test/CodeGen/AArch64/sink-and-fold.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index d418a297218eb06..036719be06d83f1 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -200,7 +200,7 @@ static cl::opt<bool> EnableGISelLoadStoreOptPostLegal(
 static cl::opt<bool>
     EnableSinkFold("aarch64-enable-sink-fold",
                    cl::desc("Enable sinking and folding of instruction copies"),
-                   cl::init(false), cl::Hidden);
+                   cl::init(true), cl::Hidden);
 
 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Target() {
   // Register the target.

diff  --git a/llvm/test/CodeGen/AArch64/sink-and-fold.ll b/llvm/test/CodeGen/AArch64/sink-and-fold.ll
index 632fdb391053121..52007221e12a7b5 100644
--- a/llvm/test/CodeGen/AArch64/sink-and-fold.ll
+++ b/llvm/test/CodeGen/AArch64/sink-and-fold.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -aarch64-enable-sink-fold=true < %s | FileCheck %s
+; RUN: llc < %s | FileCheck %s
 target triple = "aarch64-linux"
 
 declare i32 @use(...)


        


More information about the llvm-commits mailing list