Skip to content

Commit 455ccde

Browse files
author
Chen Zheng
committed
[PowerPC] add more high latency opcodes for machinecombiner - NFC
1 parent d6b3b8a commit 455ccde

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

llvm/test/CodeGen/PowerPC/machine-combiner.ll

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-PWR
22
; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q < %s | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-QPX
3+
; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr9 < %s | FileCheck %s -check-prefix=FIXPOINT
34
target datalayout = "E-m:e-i64:64-n32:64"
45
target triple = "powerpc64-unknown-linux-gnu"
56

@@ -185,4 +186,31 @@ define double @reassociate_muls_double(double %x0, double %x1, double %x2, doubl
185186
ret double %t2
186187
}
187188

189+
define i32 @reassociate_mullw(i32 %x0, i32 %x1, i32 %x2, i32 %x3) {
190+
; FIXPOINT-LABEL: reassociate_mullw:
191+
; FIXPOINT: # %bb.0:
192+
; FIXPOINT: mullw 3, 3, 4
193+
; FIXPOINT: mullw 3, 3, 5
194+
; FIXPOINT: mullw 3, 3, 6
195+
; FIXPOINT-NEXT: blr
196+
197+
%t0 = mul i32 %x0, %x1
198+
%t1 = mul i32 %t0, %x2
199+
%t2 = mul i32 %t1, %x3
200+
ret i32 %t2
201+
}
202+
203+
define i64 @reassociate_mulld(i64 %x0, i64 %x1, i64 %x2, i64 %x3) {
204+
; FIXPOINT-LABEL: reassociate_mulld:
205+
; FIXPOINT: # %bb.0:
206+
; FIXPOINT: mulld 3, 3, 4
207+
; FIXPOINT: mulld 3, 3, 5
208+
; FIXPOINT: mulld 3, 3, 6
209+
; FIXPOINT-NEXT: blr
210+
211+
%t0 = mul i64 %x0, %x1
212+
%t1 = mul i64 %t0, %x2
213+
%t2 = mul i64 %t1, %x3
214+
ret i64 %t2
215+
}
188216

0 commit comments

Comments
 (0)