1
- From 2d0b5367d14fd6ceaadefc35c2a803746c489682 Mon Sep 17 00:00:00 2001
1
+ From 1e6d1329bfc6d0e93006da98b09b0c52a2582085 Mon Sep 17 00:00:00 2001
2
2
From: Xi Ruoyao <
[email protected] >
3
3
Date: Wed, 6 Jul 2022 13:45:55 +0800
4
- Subject: [PATCH 001/133 ] loongarch: add alternatives for idiv insns to improve
4
+ Subject: [PATCH 001/301 ] loongarch: add alternatives for idiv insns to improve
5
5
code generation
6
6
7
7
Currently in the description of LoongArch integer division instructions,
@@ -40,19 +40,19 @@ gcc/testsuite/ChangeLog:
40
40
Signed-off-by: Peng Fan <
[email protected] >
41
41
Signed-off-by: ticat_fp <
[email protected] >
42
42
---
43
- gcc/config/loongarch/loongarch-protos.h | 1 +
44
- gcc/config/loongarch/loongarch.cc | 2 +-
45
- gcc/config/loongarch/loongarch.md | 28 +++++++++++++++- ------
46
- gcc /testsuite/gcc.target/loongarch/div-1.c | 9 + ++++++
47
- gcc /testsuite/gcc.target/loongarch/div-2.c | 9 + ++++++
48
- gcc /testsuite/gcc.target/loongarch/div-3.c | 9 + ++++++
43
+ src/ gcc/config/loongarch/loongarch-protos.h | 1 +
44
+ src/ gcc/config/loongarch/loongarch.cc | 2 +-
45
+ src/ gcc/config/loongarch/loongarch.md | 28 +++++++++++++------
46
+ ... /testsuite/gcc.target/loongarch/div-1.c | 9 ++++++
47
+ ... /testsuite/gcc.target/loongarch/div-2.c | 9 ++++++
48
+ ... /testsuite/gcc.target/loongarch/div-3.c | 9 ++++++
49
49
6 files changed, 49 insertions(+), 9 deletions(-)
50
- create mode 100644 gcc/testsuite/gcc.target/loongarch/div-1.c
51
- create mode 100644 gcc/testsuite/gcc.target/loongarch/div-2.c
52
- create mode 100644 gcc/testsuite/gcc.target/loongarch/div-3.c
50
+ create mode 100644 src/ gcc/testsuite/gcc.target/loongarch/div-1.c
51
+ create mode 100644 src/ gcc/testsuite/gcc.target/loongarch/div-2.c
52
+ create mode 100644 src/ gcc/testsuite/gcc.target/loongarch/div-3.c
53
53
54
- diff --git a/gcc/config/loongarch/loongarch-protos.h b/gcc/config/loongarch/loongarch-protos.h
55
- index 2144c2421ed..2287fd3763c 100644
54
+ diff --git a/src/ gcc/config/loongarch/loongarch-protos.h b/src /gcc/config/loongarch/loongarch-protos.h
55
+ index 2144c2421..2287fd376 100644
56
56
--- a/src/gcc/config/loongarch/loongarch-protos.h
57
57
+++ b/src/gcc/config/loongarch/loongarch-protos.h
58
58
@@ -130,6 +130,7 @@ extern bool loongarch_symbol_binds_local_p (const_rtx);
@@ -63,8 +63,8 @@ index 2144c2421ed..2287fd3763c 100644
63
63
64
64
union loongarch_gen_fn_ptrs
65
65
{
66
- diff --git a/gcc/config/loongarch/loongarch.cc b/gcc/config/loongarch/loongarch.cc
67
- index 33b1919e7a3..8b1b48d57c9 100644
66
+ diff --git a/src/ gcc/config/loongarch/loongarch.cc b/src /gcc/config/loongarch/loongarch.cc
67
+ index 33b1919e7..8b1b48d57 100644
68
68
--- a/src/gcc/config/loongarch/loongarch.cc
69
69
+++ b/src/gcc/config/loongarch/loongarch.cc
70
70
@@ -2112,7 +2112,7 @@ loongarch_load_store_insns (rtx mem, rtx_insn *insn)
@@ -76,8 +76,8 @@ index 33b1919e7a3..8b1b48d57c9 100644
76
76
loongarch_check_zero_div_p (void)
77
77
{
78
78
/* if -m[no-]check-zero-division is given explicitly. */
79
- diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
80
- index b49e058407c..63781518533 100644
79
+ diff --git a/src/ gcc/config/loongarch/loongarch.md b/src /gcc/config/loongarch/loongarch.md
80
+ index b49e05840..637815185 100644
81
81
--- a/src/gcc/config/loongarch/loongarch.md
82
82
+++ b/src/gcc/config/loongarch/loongarch.md
83
83
@@ -111,6 +111,8 @@
@@ -134,9 +134,9 @@ index b49e058407c..63781518533 100644
134
134
135
135
;; Floating point multiply accumulate instructions.
136
136
137
- diff --git a/gcc/testsuite/gcc.target/loongarch/div-1.c b/gcc/testsuite/gcc.target/loongarch/div-1.c
137
+ diff --git a/src/ gcc/testsuite/gcc.target/loongarch/div-1.c b/src /gcc/testsuite/gcc.target/loongarch/div-1.c
138
138
new file mode 100644
139
- index 00000000000..b1683f8535f
139
+ index 000000000..b1683f853
140
140
--- /dev/null
141
141
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-1.c
142
142
@@ -0,0 +1,9 @@
@@ -149,9 +149,9 @@ index 00000000000..b1683f8535f
149
149
+ {
150
150
+ return a / b;
151
151
+ }
152
- diff --git a/gcc/testsuite/gcc.target/loongarch/div-2.c b/gcc/testsuite/gcc.target/loongarch/div-2.c
152
+ diff --git a/src/ gcc/testsuite/gcc.target/loongarch/div-2.c b/src /gcc/testsuite/gcc.target/loongarch/div-2.c
153
153
new file mode 100644
154
- index 00000000000..4c2beb5b930
154
+ index 000000000..4c2beb5b9
155
155
--- /dev/null
156
156
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-2.c
157
157
@@ -0,0 +1,9 @@
@@ -164,9 +164,9 @@ index 00000000000..4c2beb5b930
164
164
+ {
165
165
+ return b / a;
166
166
+ }
167
- diff --git a/gcc/testsuite/gcc.target/loongarch/div-3.c b/gcc/testsuite/gcc.target/loongarch/div-3.c
167
+ diff --git a/src/ gcc/testsuite/gcc.target/loongarch/div-3.c b/src /gcc/testsuite/gcc.target/loongarch/div-3.c
168
168
new file mode 100644
169
- index 00000000000..d25969263f5
169
+ index 000000000..d25969263
170
170
--- /dev/null
171
171
+++ b/src/gcc/testsuite/gcc.target/loongarch/div-3.c
172
172
@@ -0,0 +1,9 @@
@@ -180,5 +180,5 @@ index 00000000000..d25969263f5
180
180
+ return b / a;
181
181
+ }
182
182
- -
183
- 2.43.4
183
+ 2.45.2
184
184
0 commit comments