[llvm] 455ccde - [PowerPC] add more high latency opcodes for machinecombiner - NFC

Chen Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun May 17 18:02:19 PDT 2020


Author: Chen Zheng
Date: 2020-05-17T21:02:06-04:00
New Revision: 455ccde1377b3ec32d321eb7c38808fecdf230a8

URL: https://github.com/llvm/llvm-project/commit/455ccde1377b3ec32d321eb7c38808fecdf230a8
DIFF: https://github.com/llvm/llvm-project/commit/455ccde1377b3ec32d321eb7c38808fecdf230a8.diff

LOG: [PowerPC] add more high latency opcodes for machinecombiner - NFC

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/PowerPC/machine-combiner.ll b/llvm/test/CodeGen/PowerPC/machine-combiner.ll
index cc8a2ec5de72..9acce1f8779d 100644
--- a/llvm/test/CodeGen/PowerPC/machine-combiner.ll
+++ b/llvm/test/CodeGen/PowerPC/machine-combiner.ll
@@ -1,5 +1,6 @@
 ; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr7 < %s | FileCheck  %s -check-prefix=CHECK -check-prefix=CHECK-PWR
 ; RUN: llc -verify-machineinstrs -O3 -mcpu=a2q < %s | FileCheck  %s -check-prefix=CHECK -check-prefix=CHECK-QPX
+; RUN: llc -verify-machineinstrs -O3 -mcpu=pwr9 < %s | FileCheck  %s -check-prefix=FIXPOINT
 target datalayout = "E-m:e-i64:64-n32:64"
 target triple = "powerpc64-unknown-linux-gnu"
 
@@ -185,4 +186,31 @@ define double @reassociate_muls_double(double %x0, double %x1, double %x2, doubl
   ret double %t2
 }
 
+define i32 @reassociate_mullw(i32 %x0, i32 %x1, i32 %x2, i32 %x3) {
+; FIXPOINT-LABEL: reassociate_mullw:
+; FIXPOINT:       # %bb.0:
+; FIXPOINT:       mullw 3, 3, 4
+; FIXPOINT:       mullw 3, 3, 5
+; FIXPOINT:       mullw 3, 3, 6
+; FIXPOINT-NEXT:  blr
+
+  %t0 = mul i32 %x0, %x1
+  %t1 = mul i32 %t0, %x2
+  %t2 = mul i32 %t1, %x3
+  ret i32 %t2
+}
+
+define i64 @reassociate_mulld(i64 %x0, i64 %x1, i64 %x2, i64 %x3) {
+; FIXPOINT-LABEL: reassociate_mulld:
+; FIXPOINT:       # %bb.0:
+; FIXPOINT:       mulld 3, 3, 4
+; FIXPOINT:       mulld 3, 3, 5
+; FIXPOINT:       mulld 3, 3, 6
+; FIXPOINT-NEXT:  blr
+
+  %t0 = mul i64 %x0, %x1
+  %t1 = mul i64 %t0, %x2
+  %t2 = mul i64 %t1, %x3
+  ret i64 %t2
+}
 


        


More information about the llvm-commits mailing list