From 22a15b47d400bdfeaacd8facbedc77e68b082e97 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Mon, 9 Jun 2014 01:54:00 +0000 Subject: [PATCH] [AArch64] Fix the ordering of the accumulate operand in SchedRW list. Patch by Dave Estes http://reviews.llvm.org/D4037 llvm-svn: 210446 --- lib/Target/AArch64/AArch64InstrFormats.td | 6 +++--- test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/Target/AArch64/AArch64InstrFormats.td b/lib/Target/AArch64/AArch64InstrFormats.td index d455d7e45e0..4091c76fd49 100644 --- a/lib/Target/AArch64/AArch64InstrFormats.td +++ b/lib/Target/AArch64/AArch64InstrFormats.td @@ -1323,13 +1323,13 @@ class BaseMulAccum opc, RegisterClass multype, multiclass MulAccum { def Wrrr : BaseMulAccum, - Sched<[WriteIM32, ReadIMA, ReadIM, ReadIM]> { + Sched<[WriteIM32, ReadIM, ReadIM, ReadIMA]> { let Inst{31} = 0; } def Xrrr : BaseMulAccum, - Sched<[WriteIM64, ReadIMA, ReadIM, ReadIM]> { + Sched<[WriteIM64, ReadIM, ReadIM, ReadIMA]> { let Inst{31} = 1; } } @@ -1339,7 +1339,7 @@ class WideMulAccum opc, string asm, : BaseMulAccum, - Sched<[WriteIM32, ReadIMA, ReadIM, ReadIM]> { + Sched<[WriteIM32, ReadIM, ReadIM, ReadIMA]> { let Inst{31} = 1; } diff --git a/test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll b/test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll index 97bfb5ca9d3..07373ccedc5 100644 --- a/test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll +++ b/test/CodeGen/AArch64/arm64-misched-forwarding-A53.ll @@ -6,9 +6,10 @@ ; ; CHECK: ********** MI Scheduling ********** ; CHECK: shiftable -; CHECK: *** Final schedule for BB#0 *** -; CHECK: ADDXrr %vreg0, %vreg2 -; CHECK: ADDXrs %vreg0, %vreg2, 5 +; CHECK: SU(2): %vreg2 = SUBXri %vreg1, 20, 0 +; CHECK: Successors: +; CHECK-NEXT: val SU(4): Latency=1 Reg=%vreg2 +; CHECK-NEXT: val SU(3): Latency=2 Reg=%vreg2 ; CHECK: ********** INTERVALS ********** define i64 @shiftable(i64 %A, i64 %B) { %tmp0 = sub i64 %B, 20