> Would it make sense to pull the check into get_equiv_with_elimination(),
> i.e., let the function look through the subreg and deal with invalid
> substitutions?  Then the check would also apply at another call side in
> loc_equivalence_change_p() where we also deal with subregs and potential
> invalid substitutions.

Yep, good idea.  One issue I saw before, though, is that it wasn't enough to 
just set subst = old (what the check in get_equiv_with_elimination would do) 
but I needed to explicitly "continue", otherwise simplify_operand_subreg(?) 
would kick in and still perform a wrong substitution.

One could argue that then simplify_operand_subreg simply needs to be fixed as 
well ;) but I was a bit hesitant to change more than what was immediately 
obvious to me.

I'll re-run with your suggestion and report back.

-- 
Regards
 Robin

Reply via email to