[llvm] dbb9fae - Re-apply '[AArch64] Enable "sink-and-fold" in MachineSink by default (#67432)'
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 13 04:14:35 PDT 2023
Author: Momchil Velikov
Date: 2023-10-13T12:14:22+01:00
New Revision: dbb9faedec5e28ab3f584f5e14d31e475ac268ac
URL: https://github.com/llvm/llvm-project/commit/dbb9faedec5e28ab3f584f5e14d31e475ac268ac
DIFF: https://github.com/llvm/llvm-project/commit/dbb9faedec5e28ab3f584f5e14d31e475ac268ac.diff
LOG: Re-apply '[AArch64] Enable "sink-and-fold" in MachineSink by default (#67432)'
This re-applies commit a9d0ab2ee572f179f80483f3ebbbcdd03c3b4481, which
was reverted by 8abb2ace888bdd04a1bdb4ac2f2fc25d57a5760a.
The issue was fixed by 7510f32f906ab4e583542eae2611b020f88629af
Added:
Modified:
llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
llvm/test/CodeGen/AArch64/machine-sink-cache-invalidation.ll
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 3d818c76bd4b7d7..fcc30a7cfceaf47 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/machine-sink-cache-invalidation.ll b/llvm/test/CodeGen/AArch64/machine-sink-cache-invalidation.ll
index ad6fdb6f1f9b944..ce000021fb29bff 100644
--- a/llvm/test/CodeGen/AArch64/machine-sink-cache-invalidation.ll
+++ b/llvm/test/CodeGen/AArch64/machine-sink-cache-invalidation.ll
@@ -22,8 +22,7 @@ define i32 @nsis_BZ2_bzDecompress(ptr %pos.i, i1 %cmp661.not3117.i, i1 %exitcond
; CHECK-NEXT: // in Loop: Header=BB0_2 Depth=1
; CHECK-NEXT: mov x9, xzr
; CHECK-NEXT: ldrb w9, [x9]
-; CHECK-NEXT: add x9, x0, x9
-; CHECK-NEXT: strb wzr, [x9]
+; CHECK-NEXT: strb wzr, [x0, x9]
; CHECK-NEXT: b .LBB0_1
; CHECK-NEXT: .LBB0_4: // %for.end677.i
; CHECK-NEXT: mov w0, wzr
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