[llvm] bd28889 - [RISCV] Add coverage for strength reduction of mul 2^N +/- 3/5/9
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 07:59:43 PDT 2024
Author: Philip Reames
Date: 2024-04-16T07:59:26-07:00
New Revision: bd28889732e14ac6baca686c3ec99a82fc9cd89d
URL: https://github.com/llvm/llvm-project/commit/bd28889732e14ac6baca686c3ec99a82fc9cd89d
DIFF: https://github.com/llvm/llvm-project/commit/bd28889732e14ac6baca686c3ec99a82fc9cd89d.diff
LOG: [RISCV] Add coverage for strength reduction of mul 2^N +/- 3/5/9
Added:
Modified:
llvm/test/CodeGen/RISCV/rv64zba.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/RISCV/rv64zba.ll b/llvm/test/CodeGen/RISCV/rv64zba.ll
index 0d1d4838c61133..a84b9e5e7962f6 100644
--- a/llvm/test/CodeGen/RISCV/rv64zba.ll
+++ b/llvm/test/CodeGen/RISCV/rv64zba.ll
@@ -567,6 +567,66 @@ define i64 @mul96(i64 %a) {
ret i64 %c
}
+define i64 @mul119(i64 %a) {
+; CHECK-LABEL: mul119:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 119
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 119
+ ret i64 %c
+}
+
+define i64 @mul123(i64 %a) {
+; CHECK-LABEL: mul123:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 123
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 123
+ ret i64 %c
+}
+
+define i64 @mul125(i64 %a) {
+; CHECK-LABEL: mul125:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 125
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 125
+ ret i64 %c
+}
+
+define i64 @mul131(i64 %a) {
+; CHECK-LABEL: mul131:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 131
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 131
+ ret i64 %c
+}
+
+define i64 @mul133(i64 %a) {
+; CHECK-LABEL: mul133:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 133
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 133
+ ret i64 %c
+}
+
+define i64 @mul137(i64 %a) {
+; CHECK-LABEL: mul137:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li a1, 137
+; CHECK-NEXT: mul a0, a0, a1
+; CHECK-NEXT: ret
+ %c = mul i64 %a, 137
+ ret i64 %c
+}
+
define i64 @mul160(i64 %a) {
; RV64I-LABEL: mul160:
; RV64I: # %bb.0:
More information about the llvm-commits
mailing list