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
5e839bc8
Commit
5e839bc8
authored
Sep 17, 2005
by
David Edelsohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment to expand_mult max_cost change.
From-SVN: r104379
parent
579ad6bf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
gcc/expmed.c
+8
-4
No files found.
gcc/expmed.c
View file @
5e839bc8
...
...
@@ -3022,7 +3022,7 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
&&
(
unsignedp
||
!
flag_trapv
))
{
HOST_WIDE_INT
coeff
=
0
;
rtx
reg
=
gen_raw_REG
(
mode
,
LAST_VIRTUAL_REGISTER
+
1
);
rtx
fake_
reg
=
gen_raw_REG
(
mode
,
LAST_VIRTUAL_REGISTER
+
1
);
/* synth_mult does an `unsigned int' multiply. As long as the mode is
less than or equal in size to `unsigned int' this doesn't matter.
...
...
@@ -3040,8 +3040,10 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
&&
GET_MODE_BITSIZE
(
mode
)
>
HOST_BITS_PER_WIDE_INT
)
{
/* Its safe to use -INTVAL (op1) even for INT_MIN, as the
result is interpreted as an unsigned coefficient. */
max_cost
=
rtx_cost
(
gen_rtx_MULT
(
mode
,
reg
,
op1
),
SET
)
result is interpreted as an unsigned coefficient.
Exclude cost of op0 from max_cost to match the cost
calculation of the synth_mult. */
max_cost
=
rtx_cost
(
gen_rtx_MULT
(
mode
,
fake_reg
,
op1
),
SET
)
-
neg_cost
[
mode
];
if
(
max_cost
>
0
&&
choose_mult_variant
(
mode
,
-
INTVAL
(
op1
),
&
algorithm
,
...
...
@@ -3084,7 +3086,9 @@ expand_mult (enum machine_mode mode, rtx op0, rtx op1, rtx target,
build_int_cst
(
NULL_TREE
,
floor_log2
(
coeff
)),
target
,
unsignedp
);
max_cost
=
rtx_cost
(
gen_rtx_MULT
(
mode
,
reg
,
op1
),
SET
);
/* Exclude cost of op0 from max_cost to match the cost
calculation of the synth_mult. */
max_cost
=
rtx_cost
(
gen_rtx_MULT
(
mode
,
fake_reg
,
op1
),
SET
);
if
(
choose_mult_variant
(
mode
,
coeff
,
&
algorithm
,
&
variant
,
max_cost
))
return
expand_mult_const
(
mode
,
op0
,
coeff
,
target
,
...
...
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