Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b88c92cc
Commit
b88c92cc
authored
Jun 09, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(final_scan_insn): Use single_set to check cc_status.flags.
From-SVN: r14177
parent
f9dcab52
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
gcc/final.c
+14
-10
No files found.
gcc/final.c
View file @
b88c92cc
...
@@ -1651,7 +1651,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
...
@@ -1651,7 +1651,7 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
default
:
default
:
{
{
register
rtx
body
=
PATTERN
(
insn
);
register
rtx
body
=
PATTERN
(
insn
)
,
set
;
int
insn_code_number
;
int
insn_code_number
;
char
*
template
;
char
*
template
;
rtx
note
;
rtx
note
;
...
@@ -1853,6 +1853,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
...
@@ -1853,6 +1853,8 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
body
=
PATTERN
(
insn
);
body
=
PATTERN
(
insn
);
#ifdef HAVE_cc0
#ifdef HAVE_cc0
set
=
single_set
(
insn
);
/* Check for redundant test and compare instructions
/* Check for redundant test and compare instructions
(when the condition codes are already set up as desired).
(when the condition codes are already set up as desired).
This is done only when optimizing; if not optimizing,
This is done only when optimizing; if not optimizing,
...
@@ -1863,7 +1865,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
...
@@ -1863,7 +1865,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
if
(
optimize
)
if
(
optimize
)
{
{
#if 0
rtx set = single_set(insn);
rtx set = single_set(insn);
#endif
if
(
set
if
(
set
&&
GET_CODE
(
SET_DEST
(
set
))
==
CC0
&&
GET_CODE
(
SET_DEST
(
set
))
==
CC0
...
@@ -1978,20 +1982,20 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
...
@@ -1978,20 +1982,20 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
handle conditional moves (if this machine has either one). */
handle conditional moves (if this machine has either one). */
if
(
cc_status
.
flags
!=
0
if
(
cc_status
.
flags
!=
0
&&
GET_CODE
(
body
)
==
SET
)
&&
set
!=
0
)
{
{
rtx
cond_rtx
,
then_rtx
,
else_rtx
;
rtx
cond_rtx
,
then_rtx
,
else_rtx
;
if
(
GET_CODE
(
insn
)
!=
JUMP_INSN
if
(
GET_CODE
(
insn
)
!=
JUMP_INSN
&&
GET_CODE
(
SET_SRC
(
body
))
==
IF_THEN_ELSE
)
&&
GET_CODE
(
SET_SRC
(
set
))
==
IF_THEN_ELSE
)
{
{
cond_rtx
=
XEXP
(
SET_SRC
(
body
),
0
);
cond_rtx
=
XEXP
(
SET_SRC
(
set
),
0
);
then_rtx
=
XEXP
(
SET_SRC
(
body
),
1
);
then_rtx
=
XEXP
(
SET_SRC
(
set
),
1
);
else_rtx
=
XEXP
(
SET_SRC
(
body
),
2
);
else_rtx
=
XEXP
(
SET_SRC
(
set
),
2
);
}
}
else
else
{
{
cond_rtx
=
SET_SRC
(
body
);
cond_rtx
=
SET_SRC
(
set
);
then_rtx
=
const_true_rtx
;
then_rtx
=
const_true_rtx
;
else_rtx
=
const0_rtx
;
else_rtx
=
const0_rtx
;
}
}
...
@@ -2014,12 +2018,12 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
...
@@ -2014,12 +2018,12 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
break
;
break
;
result
=
alter_cond
(
cond_rtx
);
result
=
alter_cond
(
cond_rtx
);
if
(
result
==
1
)
if
(
result
==
1
)
validate_change
(
insn
,
&
SET_SRC
(
body
),
then_rtx
,
0
);
validate_change
(
insn
,
&
SET_SRC
(
set
),
then_rtx
,
0
);
else
if
(
result
==
-
1
)
else
if
(
result
==
-
1
)
validate_change
(
insn
,
&
SET_SRC
(
body
),
else_rtx
,
0
);
validate_change
(
insn
,
&
SET_SRC
(
set
),
else_rtx
,
0
);
else
if
(
result
==
2
)
else
if
(
result
==
2
)
INSN_CODE
(
insn
)
=
-
1
;
INSN_CODE
(
insn
)
=
-
1
;
if
(
SET_DEST
(
body
)
==
SET_SRC
(
body
))
if
(
SET_DEST
(
set
)
==
SET_SRC
(
set
))
{
{
PUT_CODE
(
insn
,
NOTE
);
PUT_CODE
(
insn
,
NOTE
);
NOTE_LINE_NUMBER
(
insn
)
=
NOTE_INSN_DELETED
;
NOTE_LINE_NUMBER
(
insn
)
=
NOTE_INSN_DELETED
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment