Bug? flow_find_cross_jump deletes USE insns ...

Ulrich Weigand Ulrich.Weigand@de.ibm.com
Mon Jan 14 08:34:00 GMT 2002


Hello,

a couple of glibc routines are miscompiled on S/390 because
the cross-jump optimizations remove USE insns after reload.

The prolog on S/390 generates a USE insn for the GOT register,
because the GOT pointer must be loaded even if it isn't used
in the routine (because the PLT stubs rely on the register).

This works fine normally, however it can happen that the
cross-jump optimization pass decides to delete the very first
insn after the prolog.  If this occurs, there is code in
flow_find_cross_jump that, as the comment says, tries to
'include preceding notes and labels in the cross-junmp'.

However, it uses the 'active_insn_p' routine to check which preceding
insns to include.  After reload, this predicate returns false
not only for notes and labels, but also for USE and CLOBBER insns.

This means that the GOT register USE insn is killed, and later
passes then decide to remove the GOT-setting insns as well ...

Is the use of a USE insn for this purpose (after reload) not
supported after all?  Or is this a bug in cross-jump optimization?


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com



More information about the Gcc mailing list