[Bug target/53975] [ia64] Target register of a speculative load moved to a branch register prior to the chk.s instruction

abel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 24 09:22:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975

--- Comment #14 from Andrey Belevantsev <abel at gcc dot gnu.org> 2012-07-24 09:22:14 UTC ---
The problem is that we don't handle this type of speculation well in sel-sched.
 While moving an insn through speculation check, it is hard to decide for us
whether it is safe, while it's simpler in haifa with explicit dependency lists.
 In this case, we have a true dependency to the load which in the old scheduler
would be moved to the check instead with the correct speculation bits, and thus
the backend will have a chance to allow or deny speculation (note that
currently it denis all of those "secondary" speculations anyways).  

In sel-sched we have only a check which does not longer write an address
register but just reads it, thus we no longer have a true dependency. 
Previosly, we just banned any insns that read registers to move through a
check, but later we (incorrectly) "fixed" it by only considering registers that
are written by the check.  So either we revert the patch at
http://gcc.gnu.org/viewcvs?view=revision&revision=177658 or we add e.g.
clobbers of address register to the check patterns in ia64.md _and_ allow
limited instructions (e.g. ones writing to general or fp regs) for BE_IN_SPEC
speculation in ia64.c, i.e. to be moved up past a speculation check.



More information about the Gcc-bugs mailing list