This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/38544] missed opportunity to use adc
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2008 08:56:12 -0000
- Subject: [Bug target/38544] missed opportunity to use adc
- References: <bug-38544-16812@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from ubizjak at gmail dot com 2008-12-17 08:56 -------
There are various scary comments in ifcvt.c, noce_process_if_block() regarding
memory operands, like:
/* Only operate on register destinations, and even then avoid extending
the lifetime of hard registers on small register class machines. */
and
/* Don't operate on sources that may trap or are volatile. */
and
/* Avoid store speculation: given "if (...) x = a" where x is a
MEM, we only want to do the store if x is always set
somewhere in the function. This avoids cases like
if (pthread_mutex_trylock(mutex))
++global_variable;
where we only want global_variable to be changed if the mutex
is held. FIXME: This should ideally be expressed directly in
RTL somehow. */
I don't think it is always safe to simplify global memory operands.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38544