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
49219895
Commit
49219895
authored
Jul 30, 2000
by
Jan Hubicka
Committed by
Jan Hubicka
Jul 30, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* combine.c (if_then_else_cond): Be sure that mode fits in HOST_WIDE_INT
From-SVN: r35347
parent
25af74a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
gcc/ChangeLog
+4
-0
gcc/combine.c
+8
-5
No files found.
gcc/ChangeLog
View file @
49219895
Sun Jul 30 20:30:41 MET DST 2000 Jan Hubicka <jh@suse.cz>
* combine.c (if_then_else_cond): Be sure that mode fits in HOST_WIDE_INT
Sun Jul 30 20:27:36 MET DST 2000 Jan Hubicka <jh@suse.cz>
* combine.c (record_promoted_value): Allow bitsize of mode
...
...
gcc/combine.c
View file @
49219895
...
...
@@ -7210,7 +7210,6 @@ if_then_else_cond (x, ptrue, pfalse)
{
enum
machine_mode
mode
=
GET_MODE
(
x
);
enum
rtx_code
code
=
GET_CODE
(
x
);
unsigned
int
size
=
GET_MODE_BITSIZE
(
mode
);
rtx
cond0
,
cond1
,
true0
,
true1
,
false0
,
false1
;
unsigned
HOST_WIDE_INT
nz
;
...
...
@@ -7361,9 +7360,9 @@ if_then_else_cond (x, ptrue, pfalse)
true0
=
operand_subword
(
true0
,
SUBREG_WORD
(
x
),
0
,
mode
);
false0
=
operand_subword
(
false0
,
SUBREG_WORD
(
x
),
0
,
mode
);
}
*
ptrue
=
force_to_mode
(
true0
,
mode
,
GET_MODE_MASK
(
mode
)
,
NULL_RTX
,
0
);
*
ptrue
=
force_to_mode
(
true0
,
mode
,
~
(
HOST_WIDE_INT
)
0
,
NULL_RTX
,
0
);
*
pfalse
=
force_to_mode
(
false0
,
mode
,
GET_MODE_MASK
(
mode
)
,
NULL_RTX
,
0
);
=
force_to_mode
(
false0
,
mode
,
~
(
HOST_WIDE_INT
)
0
,
NULL_RTX
,
0
);
return
cond0
;
}
...
...
@@ -7376,14 +7375,18 @@ if_then_else_cond (x, ptrue, pfalse)
/* If X is known to be either 0 or -1, those are the true and
false values when testing X. */
else
if
(
num_sign_bit_copies
(
x
,
mode
)
==
size
)
else
if
(
x
==
constm1_rtx
||
x
==
const0_rtx
||
(
mode
!=
VOIDmode
&&
num_sign_bit_copies
(
x
,
mode
)
==
GET_MODE_BITSIZE
(
mode
)))
{
*
ptrue
=
constm1_rtx
,
*
pfalse
=
const0_rtx
;
return
x
;
}
/* Likewise for 0 or a single bit. */
else
if
(
exact_log2
(
nz
=
nonzero_bits
(
x
,
mode
))
>=
0
)
else
if
(
mode
!=
VOIDmode
&&
GET_MODE_BITSIZE
(
mode
)
<=
HOST_BITS_PER_WIDE_INT
&&
exact_log2
(
nz
=
nonzero_bits
(
x
,
mode
))
>=
0
)
{
*
ptrue
=
GEN_INT
(
nz
),
*
pfalse
=
const0_rtx
;
return
x
;
...
...
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