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
9898deac
Commit
9898deac
authored
Nov 07, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(const_binop, case *_DIV_EXPR): Don't do special sizetype case if a
constant overflows. From-SVN: r13106
parent
1d58084a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
gcc/fold-const.c
+7
-9
No files found.
gcc/fold-const.c
View file @
9898deac
...
@@ -1171,6 +1171,8 @@ const_binop (code, arg1, arg2, notrunc)
...
@@ -1171,6 +1171,8 @@ const_binop (code, arg1, arg2, notrunc)
and saves time. */
and saves time. */
if
(
int2h
==
0
&&
int2l
>
0
if
(
int2h
==
0
&&
int2l
>
0
&&
TREE_TYPE
(
arg1
)
==
sizetype
&&
TREE_TYPE
(
arg1
)
==
sizetype
&&
!
TREE_CONSTANT_OVERFLOW
(
arg1
)
&&
!
TREE_CONSTANT_OVERFLOW
(
arg2
)
&&
int1h
==
0
&&
int1l
>=
0
)
&&
int1h
==
0
&&
int1l
>=
0
)
{
{
if
(
code
==
CEIL_DIV_EXPR
)
if
(
code
==
CEIL_DIV_EXPR
)
...
@@ -1445,18 +1447,14 @@ size_binop (code, arg0, arg1)
...
@@ -1445,18 +1447,14 @@ size_binop (code, arg0, arg1)
if
(
TREE_CODE
(
arg0
)
==
INTEGER_CST
&&
TREE_CODE
(
arg1
)
==
INTEGER_CST
)
if
(
TREE_CODE
(
arg0
)
==
INTEGER_CST
&&
TREE_CODE
(
arg1
)
==
INTEGER_CST
)
{
{
/* And some specific cases even faster than that. */
/* And some specific cases even faster than that. */
if
(
code
==
PLUS_EXPR
if
(
code
==
PLUS_EXPR
&&
integer_zerop
(
arg0
))
&&
TREE_INT_CST_LOW
(
arg0
)
==
0
&&
TREE_INT_CST_HIGH
(
arg0
)
==
0
)
return
arg1
;
return
arg1
;
if
(
code
==
MINUS_EXPR
else
if
((
code
==
MINUS_EXPR
||
code
==
PLUS_EXPR
)
&&
TREE_INT_CST_LOW
(
arg1
)
==
0
&&
integer_zerop
(
arg1
))
&&
TREE_INT_CST_HIGH
(
arg1
)
==
0
)
return
arg0
;
return
arg0
;
if
(
code
==
MULT_EXPR
else
if
(
code
==
MULT_EXPR
&&
integer_onep
(
arg0
))
&&
TREE_INT_CST_LOW
(
arg0
)
==
1
&&
TREE_INT_CST_HIGH
(
arg0
)
==
0
)
return
arg1
;
return
arg1
;
/* Handle general case of two integer constants. */
/* Handle general case of two integer constants. */
return
const_binop
(
code
,
arg0
,
arg1
,
0
);
return
const_binop
(
code
,
arg0
,
arg1
,
0
);
}
}
...
...
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