This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

incorrect speculation on ia64-redhat-linux (GCSE pass)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]