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
04373f92
Commit
04373f92
authored
Nov 04, 2019
by
Aldy Hernandez
Committed by
Aldy Hernandez
Nov 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not special case pointers in value_range_base::set.
From-SVN: r277799
parent
1dee8996
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
gcc/ChangeLog
+4
-0
gcc/tree-vrp.c
+3
-8
No files found.
gcc/ChangeLog
View file @
04373f92
2019-11-04 Aldy Hernandez <aldyh@redhat.com>
* tree-vrp.c (value_range_base::set): Do not special case pointers.
2019-11-04 Tobias Burnus <tobias@codesourcery.com>
2019-11-04 Tobias Burnus <tobias@codesourcery.com>
* config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): New function.
* config/gcn/gcn.c (gcn_omp_device_kind_arch_isa): New function.
gcc/tree-vrp.c
View file @
04373f92
...
@@ -793,10 +793,8 @@ value_range_base::set (enum value_range_kind kind, tree min, tree max)
...
@@ -793,10 +793,8 @@ value_range_base::set (enum value_range_kind kind, tree min, tree max)
{
{
/* For -fstrict-enums we may receive out-of-range ranges so consider
/* For -fstrict-enums we may receive out-of-range ranges so consider
values < -INF and values > INF as -INF/INF as well. */
values < -INF and values > INF as -INF/INF as well. */
bool
is_min
=
(
INTEGRAL_TYPE_P
(
type
)
bool
is_min
=
vrp_val_is_min
(
min
);
&&
tree_int_cst_compare
(
min
,
TYPE_MIN_VALUE
(
type
))
<=
0
);
bool
is_max
=
vrp_val_is_max
(
max
);
bool
is_max
=
(
INTEGRAL_TYPE_P
(
type
)
&&
tree_int_cst_compare
(
max
,
TYPE_MAX_VALUE
(
type
))
>=
0
);
if
(
is_min
&&
is_max
)
if
(
is_min
&&
is_max
)
{
{
...
@@ -816,10 +814,7 @@ value_range_base::set (enum value_range_kind kind, tree min, tree max)
...
@@ -816,10 +814,7 @@ value_range_base::set (enum value_range_kind kind, tree min, tree max)
min
=
max
=
vrp_val_min
(
TREE_TYPE
(
min
));
min
=
max
=
vrp_val_min
(
TREE_TYPE
(
min
));
kind
=
VR_RANGE
;
kind
=
VR_RANGE
;
}
}
else
if
(
is_min
else
if
(
is_min
)
/* Allow non-zero pointers to be normalized to [1,MAX]. */
||
(
POINTER_TYPE_P
(
TREE_TYPE
(
min
))
&&
integer_zerop
(
min
)))
{
{
tree
one
=
build_int_cst
(
TREE_TYPE
(
max
),
1
);
tree
one
=
build_int_cst
(
TREE_TYPE
(
max
),
1
);
min
=
int_const_binop
(
PLUS_EXPR
,
max
,
one
);
min
=
int_const_binop
(
PLUS_EXPR
,
max
,
one
);
...
...
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