This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug inline-asm/23200] [4.0/4.1 regression] rejects "i"(&var + 1)
- From: "amacleod at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Aug 2005 17:16:02 -0000
- Subject: [Bug inline-asm/23200] [4.0/4.1 regression] rejects "i"(&var + 1)
- References: <20050802151759.23200.stsp@users.sourceforge.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From amacleod at redhat dot com 2005-08-15 17:15 -------
TER isnt doing anything with this because there are no virtual operands. It sees:
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
D.1279 = &var + 1B;
__asm__ __volatile__(""::"i" D.1279);
return 0;
so the stmt:
D.1279 = &var + 1B;
isnt considered for replacvement since there are no dependancies whatsoever on
it. TER operates on the assumptions that if a stmt has no USES and no VUSES,
then one of the other optimizations would have done the substitution if it were
possible.
There use to be a good reason for this, and there was a comment to that effect,
but it seems to have been removed. Perhaps the original reason is gone, but the
code hasnt been properly updated to fix the issue.
A quick hack to TER to add a "NO_DEPEND_PARTITION" for such statements appears
to do what you are looking for here:
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
__asm__ __volatile__(""::"i" &var + 1B);
return 0;
I will run it through the test suites to see if it reintroduces whatever
the original problem with these types of replacements was.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23200