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
70e1b8fc
Commit
70e1b8fc
authored
Mar 22, 2003
by
Alan Modra
Committed by
Alan Modra
Mar 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* combine.c (simplify_comparison <AND>): Use gen_int_mode. Tidy.
From-SVN: r64703
parent
6932a199
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
41 deletions
+41
-41
gcc/ChangeLog
+6
-2
gcc/combine.c
+35
-39
No files found.
gcc/ChangeLog
View file @
70e1b8fc
2003-03-22 Alan Modra <amodra@bigpond.net.au>
* combine.c (simplify_comparison <AND>): Use gen_int_mode. Tidy.
2003-03-21 Zack Weinberg <zack@codesourcery.com>
2003-03-21 Zack Weinberg <zack@codesourcery.com>
* c-common.c: Include intl.h.
* c-common.c: Include intl.h.
...
@@ -414,8 +418,8 @@ Tue Mar 18 13:15:08 CET 2003 Jan Hubicka <jh@suse.cz>
...
@@ -414,8 +418,8 @@ Tue Mar 18 13:15:08 CET 2003 Jan Hubicka <jh@suse.cz>
(PROFILE_KERNEL): Remove hacks.
(PROFILE_KERNEL): Remove hacks.
* config/rs6000/rs6000.c (TARGET_PROFILE_KERNEL): Define default.
* config/rs6000/rs6000.c (TARGET_PROFILE_KERNEL): Define default.
(rs6000_stack_info): No need to save lr if just for profiling when
(rs6000_stack_info): No need to save lr if just for profiling when
TARGET_
KERNEL_PROFILE
.
TARGET_
PROFILE_KERNEL
.
(output_profile_hook): Output nothing when TARGET_
KERNEL_PROFILE
.
(output_profile_hook): Output nothing when TARGET_
PROFILE_KERNEL
.
(output_function_profiler): Localize label generation. Emit code
(output_function_profiler): Localize label generation. Emit code
for kernel profiling.
for kernel profiling.
...
...
gcc/combine.c
View file @
70e1b8fc
...
@@ -11138,49 +11138,45 @@ simplify_comparison (code, pop0, pop1)
...
@@ -11138,49 +11138,45 @@ simplify_comparison (code, pop0, pop1)
continue
;
continue
;
}
}
/* If this is (and:M1 (subreg:M2 X 0) (const_int C1)) where C1 fits
/* If this is (and:M1 (subreg:M2 X 0) (const_int C1)) where C1
in both M1 and M2 and the SUBREG is either paradoxical or
fits in both M1 and M2 and the SUBREG is either paradoxical
represents the low part, permute the SUBREG and the AND and
or represents the low part, permute the SUBREG and the AND
try again. */
and try again. */
if
(
GET_CODE
(
XEXP
(
op0
,
0
))
==
SUBREG
if
(
GET_CODE
(
XEXP
(
op0
,
0
))
==
SUBREG
)
{
unsigned
HOST_WIDE_INT
c1
;
tmode
=
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
)));
/* Require an integral mode, to avoid creating something like
/* Require an integral mode, to avoid creating something like
(AND:SF ...). */
(AND:SF ...). */
&&
SCALAR_INT_MODE_P
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))
if
(
SCALAR_INT_MODE_P
(
tmode
)
/* It is unsafe to commute the AND into the SUBREG if the SUBREG
/* It is unsafe to commute the AND into the SUBREG if the
is paradoxical and WORD_REGISTER_OPERATIONS is not defined.
SUBREG is paradoxical and WORD_REGISTER_OPERATIONS is
As originally written the upper bits have a defined value
not defined. As originally written the upper bits
due to the AND operation. However, if we commute the AND
have a defined value due to the AND operation.
inside the SUBREG then they no longer have defined values
However, if we commute the AND inside the SUBREG then
and the meaning of the code has been changed. */
they no longer have defined values and the meaning of
&&
(
0
the code has been changed. */
&&
(
0
#ifdef WORD_REGISTER_OPERATIONS
#ifdef WORD_REGISTER_OPERATIONS
||
((
mode_width
||
(
mode_width
>
GET_MODE_BITSIZE
(
tmode
)
>
(
GET_MODE_BITSIZE
&&
mode_width
<=
BITS_PER_WORD
)
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))))
&&
mode_width
<=
BITS_PER_WORD
)
#endif
#endif
||
((
mode_width
||
(
mode_width
<=
GET_MODE_BITSIZE
(
tmode
)
<=
(
GET_MODE_BITSIZE
&&
subreg_lowpart_p
(
XEXP
(
op0
,
0
))))
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))))
&&
GET_CODE
(
XEXP
(
op0
,
1
))
==
CONST_INT
&&
subreg_lowpart_p
(
XEXP
(
op0
,
0
))))
&&
mode_width
<=
HOST_BITS_PER_WIDE_INT
&&
GET_CODE
(
XEXP
(
op0
,
1
))
==
CONST_INT
&&
GET_MODE_BITSIZE
(
tmode
)
<=
HOST_BITS_PER_WIDE_INT
&&
mode_width
<=
HOST_BITS_PER_WIDE_INT
&&
((
c1
=
INTVAL
(
XEXP
(
op0
,
1
)))
&
~
mask
)
==
0
&&
(
GET_MODE_BITSIZE
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))
&&
(
c1
&
~
GET_MODE_MASK
(
tmode
))
==
0
<=
HOST_BITS_PER_WIDE_INT
)
&&
c1
!=
mask
&&
(
INTVAL
(
XEXP
(
op0
,
1
))
&
~
mask
)
==
0
&&
c1
!=
GET_MODE_MASK
(
tmode
))
&&
0
==
(
~
GET_MODE_MASK
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))
{
&
INTVAL
(
XEXP
(
op0
,
1
)))
op0
=
gen_binary
(
AND
,
tmode
,
&&
(
unsigned
HOST_WIDE_INT
)
INTVAL
(
XEXP
(
op0
,
1
))
!=
mask
SUBREG_REG
(
XEXP
(
op0
,
0
)),
&&
((
unsigned
HOST_WIDE_INT
)
INTVAL
(
XEXP
(
op0
,
1
))
gen_int_mode
(
c1
,
tmode
));
!=
GET_MODE_MASK
(
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))))))
op0
=
gen_lowpart_for_combine
(
mode
,
op0
);
continue
;
{
}
op0
=
gen_lowpart_for_combine
(
mode
,
gen_binary
(
AND
,
GET_MODE
(
SUBREG_REG
(
XEXP
(
op0
,
0
))),
SUBREG_REG
(
XEXP
(
op0
,
0
)),
XEXP
(
op0
,
1
)));
continue
;
}
}
/* Convert (ne (and (lshiftrt (not X)) 1) 0) to
/* Convert (ne (and (lshiftrt (not X)) 1) 0) to
...
...
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