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
fd13313f
Commit
fd13313f
authored
Jan 07, 2001
by
Jan Hubicka
Committed by
Jan Hubicka
Jan 07, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cse.c (fold_rtx): Handle unordered comparisons.
From-SVN: r38773
parent
91b2d119
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
23 deletions
+38
-23
gcc/ChangeLog
+4
-0
gcc/cse.c
+34
-23
No files found.
gcc/ChangeLog
View file @
fd13313f
Sun Jan 7 14:31:57 MET 2001 Jan Hubicka <jh@suse.cz>
* cse.c (fold_rtx): Handle unordered comparisons.
Sun Jan 7 13:49:19 MET 2001 Jan Hubicka <jh@suse.cz>
Sun Jan 7 13:49:19 MET 2001 Jan Hubicka <jh@suse.cz>
* rtlanal.c (set_of_1): New static function.
* rtlanal.c (set_of_1): New static function.
...
...
gcc/cse.c
View file @
fd13313f
...
@@ -3812,7 +3812,9 @@ fold_rtx (x, insn)
...
@@ -3812,7 +3812,9 @@ fold_rtx (x, insn)
if
(
validate_change
(
insn
,
&
XEXP
(
x
,
i
),
replacements
[
j
],
0
))
if
(
validate_change
(
insn
,
&
XEXP
(
x
,
i
),
replacements
[
j
],
0
))
break
;
break
;
if
(
code
==
NE
||
code
==
EQ
||
GET_RTX_CLASS
(
code
)
==
'c'
)
if
(
code
==
NE
||
code
==
EQ
||
GET_RTX_CLASS
(
code
)
==
'c'
||
code
==
LTGT
||
code
==
UNEQ
||
code
==
ORDERED
||
code
==
UNORDERED
)
{
{
validate_change
(
insn
,
&
XEXP
(
x
,
i
),
XEXP
(
x
,
1
-
i
),
1
);
validate_change
(
insn
,
&
XEXP
(
x
,
i
),
XEXP
(
x
,
1
-
i
),
1
);
validate_change
(
insn
,
&
XEXP
(
x
,
1
-
i
),
replacements
[
j
],
1
);
validate_change
(
insn
,
&
XEXP
(
x
,
1
-
i
),
replacements
[
j
],
1
);
...
@@ -3844,7 +3846,9 @@ fold_rtx (x, insn)
...
@@ -3844,7 +3846,9 @@ fold_rtx (x, insn)
operand unless the first operand is also a constant integer. Otherwise,
operand unless the first operand is also a constant integer. Otherwise,
place any constant second unless the first operand is also a constant. */
place any constant second unless the first operand is also a constant. */
if
(
code
==
EQ
||
code
==
NE
||
GET_RTX_CLASS
(
code
)
==
'c'
)
if
(
code
==
EQ
||
code
==
NE
||
GET_RTX_CLASS
(
code
)
==
'c'
||
code
==
LTGT
||
code
==
UNEQ
||
code
==
ORDERED
||
code
==
UNORDERED
)
{
{
if
(
must_swap
||
(
const_arg0
if
(
must_swap
||
(
const_arg0
&&
(
const_arg1
==
0
&&
(
const_arg1
==
0
...
@@ -3952,27 +3956,34 @@ fold_rtx (x, insn)
...
@@ -3952,27 +3956,34 @@ fold_rtx (x, insn)
return
true
;
return
true
;
}
}
/* See if the two operands are the same. We don't do this
/* See if the two operands are the same. */
for IEEE floating-point since we can't assume x == x
since x might be a NaN. */
if
(
folded_arg0
==
folded_arg1
||
(
GET_CODE
(
folded_arg0
)
==
REG
if
((
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
GET_CODE
(
folded_arg1
)
==
REG
||
!
FLOAT_MODE_P
(
mode_arg0
)
||
flag_fast_math
)
&&
(
REG_QTY
(
REGNO
(
folded_arg0
))
&&
(
folded_arg0
==
folded_arg1
==
REG_QTY
(
REGNO
(
folded_arg1
))))
||
(
GET_CODE
(
folded_arg0
)
==
REG
||
((
p0
=
lookup
(
folded_arg0
,
&&
GET_CODE
(
folded_arg1
)
==
REG
(
safe_hash
(
folded_arg0
,
mode_arg0
)
&&
(
REG_QTY
(
REGNO
(
folded_arg0
))
&
HASH_MASK
),
mode_arg0
))
==
REG_QTY
(
REGNO
(
folded_arg1
))))
&&
(
p1
=
lookup
(
folded_arg1
,
||
((
p0
=
lookup
(
folded_arg0
,
(
safe_hash
(
folded_arg1
,
mode_arg0
)
(
safe_hash
(
folded_arg0
,
mode_arg0
)
&
HASH_MASK
),
mode_arg0
))
&
HASH_MASK
),
mode_arg0
))
&&
p0
->
first_same_value
==
p1
->
first_same_value
))
&&
(
p1
=
lookup
(
folded_arg1
,
{
(
safe_hash
(
folded_arg1
,
mode_arg0
)
/* Sadly two equal NaNs are not equivalent. */
&
HASH_MASK
),
mode_arg0
))
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
&&
p0
->
first_same_value
==
p1
->
first_same_value
)))
||
!
FLOAT_MODE_P
(
mode_arg0
)
||
flag_fast_math
)
return
((
code
==
EQ
||
code
==
LE
||
code
==
GE
return
((
code
==
EQ
||
code
==
LE
||
code
==
GE
||
code
==
LEU
||
code
==
GEU
)
||
code
==
LEU
||
code
==
GEU
||
code
==
UNEQ
?
true
:
false
);
||
code
==
UNLE
||
code
==
UNGE
||
code
==
ORDERED
)
?
true
:
false
);
/* Take care for the FP compares we can resolve. */
if
(
code
==
UNEQ
||
code
==
UNLE
||
code
==
UNGE
)
return
true
;
if
(
code
==
LTGT
||
code
==
LT
||
code
==
GT
)
return
false
;
}
/* If FOLDED_ARG0 is a register, see if the comparison we are
/* If FOLDED_ARG0 is a register, see if the comparison we are
doing now is either the same as we did before or the reverse
doing now is either the same as we did before or the reverse
...
...
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