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
fab446b8
Commit
fab446b8
authored
Dec 27, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fold): Simplify more FP ops if -ffast-math.
From-SVN: r6335
parent
a83afb65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
gcc/fold-const.c
+17
-11
No files found.
gcc/fold-const.c
View file @
fab446b8
...
...
@@ -3766,7 +3766,9 @@ fold (expr)
/* Convert A - (-B) to A + B. */
else
if
(
TREE_CODE
(
arg1
)
==
NEGATE_EXPR
)
return
fold
(
build
(
PLUS_EXPR
,
type
,
arg0
,
TREE_OPERAND
(
arg1
,
0
)));
else
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
)
else
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
||
flag_fast_math
)
{
/* Except with IEEE floating point, 0-x equals -x. */
if
(
!
wins
&&
real_zerop
(
arg0
))
...
...
@@ -3774,16 +3776,18 @@ fold (expr)
/* Except with IEEE floating point, x-0 equals x. */
if
(
real_zerop
(
arg1
))
return
non_lvalue
(
convert
(
type
,
arg0
));
}
/* Fold &x - &x. This can happen from &x.foo - &x.
This is unsafe for certain floats even in non-IEEE formats.
In IEEE, it is unsafe because it does wrong for NaNs.
Also note that operand_equal_p is always false if an operand
is volatile. */
/* Fold &x - &x. This can happen from &x.foo - &x.
This is unsafe for certain floats even in non-IEEE formats.
In IEEE, it is unsafe because it does wrong for NaNs.
Also note that operand_equal_p is always false if an operand
is volatile. */
if
(
operand_equal_p
(
arg0
,
arg1
,
FLOAT_TYPE_P
(
type
)
&&
!
flag_fast_math
))
return
convert
(
type
,
integer_zero_node
);
if
(
operand_equal_p
(
arg0
,
arg1
,
FLOAT_TYPE_P
(
type
)))
return
convert
(
type
,
integer_zero_node
);
}
goto
associate
;
case
MULT_EXPR
:
...
...
@@ -3807,7 +3811,8 @@ fold (expr)
else
{
/* x*0 is 0, except for IEEE floating point. */
if
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
if
((
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
||
flag_fast_math
)
&&
real_zerop
(
arg1
))
return
omit_one_operand
(
type
,
arg1
,
arg0
);
/* In IEEE floating point, x*1 is not equivalent to x for snans.
...
...
@@ -4630,7 +4635,8 @@ fold (expr)
if
(
TREE_CODE_CLASS
(
TREE_CODE
(
arg0
))
==
'<'
&&
(
TARGET_FLOAT_FORMAT
!=
IEEE_FLOAT_FORMAT
||
!
FLOAT_TYPE_P
(
TREE_TYPE
(
TREE_OPERAND
(
arg0
,
0
))))
||
!
FLOAT_TYPE_P
(
TREE_TYPE
(
TREE_OPERAND
(
arg0
,
0
)))
||
flag_fast_math
)
&&
operand_equal_for_comparison_p
(
TREE_OPERAND
(
arg0
,
0
),
arg1
,
TREE_OPERAND
(
arg0
,
1
)))
{
...
...
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