On 03/30/2016 11:27 PM, Jakub Jelinek wrote:
Hi!

As mentioned in the PR, we are miscompiling glibc on i686-linux, because
the new indirect_jump_optimize mini-pass thinks that a insn
which has REG_LABEL_OPERAND note necessarily has to set the target register
to that label, while in the glibc case it is actually that label + some
offset, where the offset is read from a table which contains other labels -
this label differences.

The following patch changes it to just look at SET_SRC of single_set and/or
REG_EQUAL note, and only consider those if one of them is a LABEL_REF.
That alone broke lots of tests, which contain non-local gotos, so I had
to add a check that we don't do anything in this mini-pass (like old ira.c
code did) if there is REG_NON_LOCAL_GOTO note.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/5/4.9?
Bernd has preapproved the patch, but that was before the REG_NON_LOCAL_GOTO
changes.

Still ok.


Bernd


Reply via email to