This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
incorrect speculation on ia64-redhat-linux (GCSE pass)
- To: <gcc-bugs at gcc dot gnu dot org>
- Subject: incorrect speculation on ia64-redhat-linux (GCSE pass)
- From: Paolo Bonzini <bonzini at wbkst15 dot mach dot uni-karlsruhe dot de>
- Date: Tue, 16 Jan 2001 17:36:51 +0100 (CET)
In the test case I attach (compiled with 2.96-ia64-000717 snap 000717)
there is an incorrect speculated load of selfCache->object in function
interpret.
The snapshot I'm using puts selfCache in r32 then does an incorrect
ld8 r29 = [r32]
before the computed goto (`br b4') rather than in the blocks that really
access selfCache->object. This incorrect speculation is done
after every `selfCache = self' statement, as far as I can tell from a
quick look at the generated assembly language.
I was told that GCSE and computed gotos interact badly by Brad Lucier (on
gcc@gcc.gnu.org) -- and indeed interp.i uses them a lot.
The bug appears with
gcc -S -O2 -fno-inline-functions interp.i
and not with
gcc -S -O2 -fno-inline-functions -fno-gcse interp.i
(note that while compiling interp.i cc1 can grow to 70+ megabytes of
resident set)
interp.i has three warnings, but they are not important.
Paolo
interp.i.gz