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
8e7e5365
Commit
8e7e5365
authored
May 06, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(simplify_binary_operation, simplify_relational_operation): Check for
MODE_CC modes, not just CCmode. From-SVN: r4352
parent
d9d27c6e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
gcc/cse.c
+7
-7
No files found.
gcc/cse.c
View file @
8e7e5365
/* Common subexpression elimination for GNU compiler.
/* Common subexpression elimination for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992 Free Software Foundation, Inc.
Copyright (C) 1987, 1988, 1989, 1992
. 1993
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -3599,7 +3599,7 @@ simplify_binary_operation (code, mode, op0, op1)
...
@@ -3599,7 +3599,7 @@ simplify_binary_operation (code, mode, op0, op1)
if
(((
GET_CODE
(
op0
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op0
,
0
),
op1
))
if
(((
GET_CODE
(
op0
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op0
,
0
),
op1
))
||
(
GET_CODE
(
op1
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op1
,
0
),
op0
)))
||
(
GET_CODE
(
op1
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op1
,
0
),
op0
)))
&&
!
side_effects_p
(
op0
)
&&
!
side_effects_p
(
op0
)
&&
mode
!=
CCmode
)
&&
GET_MODE_CLASS
(
mode
)
!=
MODE_CC
)
return
constm1_rtx
;
return
constm1_rtx
;
break
;
break
;
...
@@ -3610,7 +3610,7 @@ simplify_binary_operation (code, mode, op0, op1)
...
@@ -3610,7 +3610,7 @@ simplify_binary_operation (code, mode, op0, op1)
&&
(
INTVAL
(
op1
)
&
GET_MODE_MASK
(
mode
))
==
GET_MODE_MASK
(
mode
))
&&
(
INTVAL
(
op1
)
&
GET_MODE_MASK
(
mode
))
==
GET_MODE_MASK
(
mode
))
return
gen_rtx
(
NOT
,
mode
,
op0
);
return
gen_rtx
(
NOT
,
mode
,
op0
);
if
(
op0
==
op1
&&
!
side_effects_p
(
op0
)
if
(
op0
==
op1
&&
!
side_effects_p
(
op0
)
&&
mode
!=
CCmode
)
&&
GET_MODE_CLASS
(
mode
)
!=
MODE_CC
)
return
const0_rtx
;
return
const0_rtx
;
break
;
break
;
...
@@ -3621,13 +3621,13 @@ simplify_binary_operation (code, mode, op0, op1)
...
@@ -3621,13 +3621,13 @@ simplify_binary_operation (code, mode, op0, op1)
&&
(
INTVAL
(
op1
)
&
GET_MODE_MASK
(
mode
))
==
GET_MODE_MASK
(
mode
))
&&
(
INTVAL
(
op1
)
&
GET_MODE_MASK
(
mode
))
==
GET_MODE_MASK
(
mode
))
return
op0
;
return
op0
;
if
(
op0
==
op1
&&
!
side_effects_p
(
op0
)
if
(
op0
==
op1
&&
!
side_effects_p
(
op0
)
&&
mode
!=
CCmode
)
&&
GET_MODE_CLASS
(
mode
)
!=
MODE_CC
)
return
op0
;
return
op0
;
/* A & (~A) -> 0 */
/* A & (~A) -> 0 */
if
(((
GET_CODE
(
op0
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op0
,
0
),
op1
))
if
(((
GET_CODE
(
op0
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op0
,
0
),
op1
))
||
(
GET_CODE
(
op1
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op1
,
0
),
op0
)))
||
(
GET_CODE
(
op1
)
==
NOT
&&
rtx_equal_p
(
XEXP
(
op1
,
0
),
op0
)))
&&
!
side_effects_p
(
op0
)
&&
!
side_effects_p
(
op0
)
&&
mode
!=
CCmode
)
&&
GET_MODE_CLASS
(
mode
)
!=
MODE_CC
)
return
const0_rtx
;
return
const0_rtx
;
break
;
break
;
...
@@ -4163,9 +4163,9 @@ simplify_relational_operation (code, mode, op0, op1)
...
@@ -4163,9 +4163,9 @@ simplify_relational_operation (code, mode, op0, op1)
if
(
GET_CODE
(
op0
)
==
COMPARE
&&
op1
==
const0_rtx
)
if
(
GET_CODE
(
op0
)
==
COMPARE
&&
op1
==
const0_rtx
)
op1
=
XEXP
(
op0
,
1
),
op0
=
XEXP
(
op0
,
0
);
op1
=
XEXP
(
op0
,
1
),
op0
=
XEXP
(
op0
,
0
);
/* What to do with
CCmode
isn't clear yet.
/* What to do with
MODE_CC
isn't clear yet.
Let's make sure nothing erroneous is done. */
Let's make sure nothing erroneous is done. */
if
(
GET_MODE
(
op0
)
==
CCmode
)
if
(
GET_MODE
_CLASS
(
GET_MODE
(
op0
))
==
MODE_CC
)
return
0
;
return
0
;
/* Unlike the arithmetic operations, we can do the comparison whether
/* Unlike the arithmetic operations, we can do the comparison whether
...
...
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