On 12/11/2012 03:21 AM, Jakub Jelinek wrote:
Hi!
As the testcase in the PR (unfortunately only reproduceable after reverting
some inlining patch, so not including that testcase in the patch) shows,
loc_equivalence_change_p isn't good enough for debug_insns, when a REG is
substituted for VOIDmode constant. In that case, the surrounding SUBREG
(handled in loc_equivalence_change_p), but also other operations like
ZERO_EXTEND/SIGN_EXTEND, ZERO_EXTRACT etc. need to be simplified while we
still know the original mode, and perhaps several times, as SIGN_EXTEND
might be in another ZERO_EXTEND etc. The best way to deal with that
is simplify_replace_fn_rtx which is used in various other places in the
compiler.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
Yes. Thanks for working on it, Jakub.
2012-12-11 Jakub Jelinek <ja...@redhat.com>
PR rtl-optimization/55193
* lra-constraints.c (loc_equivalence_callback): New function.
(lra_constraints): Call simplify_replace_fn_rtx instead of
loc_equivalence_change_p on DEBUG_INSNs.