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
f3f391d7
Commit
f3f391d7
authored
Sep 19, 1992
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(expand_binop, expand_unop): Don't make SUBREG for promoted variables as
operands. From-SVN: r2179
parent
09d7f5a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
+24
-9
gcc/optabs.c
+24
-9
No files found.
gcc/optabs.c
View file @
f3f391d7
...
...
@@ -474,15 +474,20 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* If an operand is a constant integer, we might as well
convert it since that is more efficient than using a SUBREG,
unlike the case for other operands. */
unlike the case for other operands. Similarly for
SUBREGs that were made due to promoted objects. */
if
(
no_extend
&&
GET_MODE
(
xop0
)
!=
VOIDmode
)
if
(
no_extend
&&
GET_MODE
(
xop0
)
!=
VOIDmode
&&
!
(
GET_CODE
(
xop0
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop0
)))
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
GET_MODE
(
xop0
),
xop0
),
0
);
else
xop0
=
convert_to_mode
(
wider_mode
,
xop0
,
unsignedp
);
if
(
no_extend
&&
GET_MODE
(
xop1
)
!=
VOIDmode
)
if
(
no_extend
&&
GET_MODE
(
xop1
)
!=
VOIDmode
&&
!
(
GET_CODE
(
xop1
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop1
)))
xop1
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
GET_MODE
(
xop1
),
xop1
),
0
);
else
...
...
@@ -1133,15 +1138,20 @@ expand_binop (mode, binoptab, op0, op1, target, unsignedp, methods)
/* If an operand is a constant integer, we might as well
convert it since that is more efficient than using a SUBREG,
unlike the case for other operands. */
unlike the case for other operands. Similarly for
SUBREGs that were made due to promoted objects.*/
if
(
no_extend
&&
GET_MODE
(
xop0
)
!=
VOIDmode
)
if
(
no_extend
&&
GET_MODE
(
xop0
)
!=
VOIDmode
&&
!
(
GET_CODE
(
xop0
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop0
)))
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
GET_MODE
(
xop0
),
xop0
),
0
);
else
xop0
=
convert_to_mode
(
wider_mode
,
xop0
,
unsignedp
);
if
(
no_extend
&&
GET_MODE
(
xop1
)
!=
VOIDmode
)
if
(
no_extend
&&
GET_MODE
(
xop1
)
!=
VOIDmode
&&
!
(
GET_CODE
(
xop1
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop1
)))
xop1
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
GET_MODE
(
xop1
),
xop1
),
0
);
else
...
...
@@ -1456,11 +1466,14 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
/* For certain operations, we need not actually extend
the narrow operand, as long as we will truncate the
results to the same narrowness. */
results to the same narrowness. But it is faster to
convert a SUBREG due to mode promotion. */
if
((
unoptab
==
neg_optab
||
unoptab
==
one_cmpl_optab
)
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
&&
class
==
MODE_INT
)
&&
class
==
MODE_INT
&&
!
(
GET_CODE
(
xop0
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop0
)))
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
mode
,
xop0
),
0
);
else
xop0
=
convert_to_mode
(
wider_mode
,
xop0
,
unsignedp
);
...
...
@@ -1558,7 +1571,9 @@ expand_unop (mode, unoptab, op0, target, unsignedp)
if
((
unoptab
==
neg_optab
||
unoptab
==
one_cmpl_optab
)
&&
GET_MODE_SIZE
(
wider_mode
)
<=
UNITS_PER_WORD
&&
class
==
MODE_INT
)
&&
class
==
MODE_INT
&&
!
(
GET_CODE
(
xop0
)
==
SUBREG
&&
SUBREG_PROMOTED_VAR_P
(
xop0
)))
xop0
=
gen_rtx
(
SUBREG
,
wider_mode
,
force_reg
(
mode
,
xop0
),
0
);
else
xop0
=
convert_to_mode
(
wider_mode
,
xop0
,
unsignedp
);
...
...
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