[Bug rtl-optimization/24810] [4.1/4.2 Regression] mov + mov + testl generated instead of testb
kazu at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Dec 19 00:37:00 GMT 2005
------- Comment #7 from kazu at gcc dot gnu dot org 2005-12-19 00:37 -------
We are basically talking about narrowing the memory being loaded for testing.
Now, can we really optimize this case? We've got
const volatile unsigned long *addr
I am not sure if "volatile" allows us to change the width of a memory read.
I know a chip that expects you to read memory at one address repeatedly to
transfer a block of data, and people probably use volatile
for this kind of case. If the compiler changes the width of memory access,
we may be screwing up something.
IMHO, if byte access is really desired, the code should be rewritten that way.
--
kazu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24810
More information about the Gcc-bugs
mailing list