Skip to content

Commit d15fff6

Browse files
Re-apply '[AArch64] Enable "sink-and-fold" in MachineSink by default (#67432)'
This reverts revert 1950507. An issue was fixed in bea3684 and some newly appeared tests updated.
1 parent 98c90a1 commit d15fff6

File tree

5 files changed

+78
-201
lines changed

5 files changed

+78
-201
lines changed

llvm/lib/Target/AArch64/AArch64TargetMachine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ static cl::opt<bool> EnableGISelLoadStoreOptPostLegal(
200200
static cl::opt<bool>
201201
EnableSinkFold("aarch64-enable-sink-fold",
202202
cl::desc("Enable sinking and folding of instruction copies"),
203-
cl::init(false), cl::Hidden);
203+
cl::init(true), cl::Hidden);
204204

205205
extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Target() {
206206
// Register the target.

llvm/test/CodeGen/AArch64/aarch64-mulv.ll

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -584,10 +584,11 @@ define i128 @mulv_v2i128(<2 x i128> %a) {
584584
; CHECK-GI-LABEL: mulv_v2i128:
585585
; CHECK-GI: // %bb.0: // %entry
586586
; CHECK-GI-NEXT: mul x9, x0, x3
587-
; CHECK-GI-NEXT: umulh x8, x0, x2
587+
; CHECK-GI-NEXT: mul x8, x0, x2
588+
; CHECK-GI-NEXT: umulh x10, x0, x2
588589
; CHECK-GI-NEXT: madd x9, x1, x2, x9
589-
; CHECK-GI-NEXT: mul x0, x0, x2
590-
; CHECK-GI-NEXT: add x1, x9, x8
590+
; CHECK-GI-NEXT: mov x0, x8
591+
; CHECK-GI-NEXT: add x1, x9, x10
591592
; CHECK-GI-NEXT: ret
592593
entry:
593594
%arg1 = call i128 @llvm.vector.reduce.mul.v2i128(<2 x i128> %a)

0 commit comments

Comments
 (0)