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
700ad580
Commit
700ad580
authored
29 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(range_test): Don't convert hi_cst or lo_cst to unsigned when folding
signed range tests. From-SVN: r11768
parent
84c7be4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
gcc/fold-const.c
+14
-8
No files found.
gcc/fold-const.c
View file @
700ad580
...
...
@@ -2617,15 +2617,21 @@ range_test (jcode, type, lo_code, hi_code, var, lo_cst, hi_cst)
if
(
!
TREE_UNSIGNED
(
utype
))
{
utype
=
unsigned_type
(
utype
);
var
=
convert
(
utype
,
var
);
lo_cst
=
convert
(
utype
,
lo_cst
);
hi_cst
=
convert
(
utype
,
hi_cst
);
return
fold
(
convert
(
type
,
build
(
rcode
,
utype
,
convert
(
utype
,
build
(
MINUS_EXPR
,
TREE_TYPE
(
var
),
var
,
lo_cst
)),
convert
(
utype
,
const_binop
(
MINUS_EXPR
,
hi_cst
,
lo_cst
,
0
)))));
}
return
fold
(
convert
(
type
,
build
(
rcode
,
utype
,
build
(
MINUS_EXPR
,
utype
,
var
,
lo_cst
),
const_binop
(
MINUS_EXPR
,
hi_cst
,
lo_cst
,
0
))));
else
return
fold
(
convert
(
type
,
build
(
rcode
,
utype
,
build
(
MINUS_EXPR
,
utype
,
var
,
lo_cst
),
const_binop
(
MINUS_EXPR
,
hi_cst
,
lo_cst
,
0
))));
}
/* Subroutine for fold_truthop: C is an INTEGER_CST interpreted as a P
...
...
This diff is collapsed.
Click to expand it.
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