https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117182

--- Comment #12 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #11)
> (In reply to Vladimir Makarov from comment #10)
> > I added a patch.  Could somebody check that it solves the problem.
> 
> I've tried the patch with the case from comment #2 and it doesn't it.
> 
> Looking at the patch, I don't see anything that would address the actual
> underlying problem: insn modifications are done without validating that
> mode-switching requirements of the insn are still met after the change.
> 

Simply I found a wrong (with my POV) transformation in the testcase and the
patch fixes it.  And the patch has the same effect (but not in all cases) as
Kazumoto's patch for cannot_substitute_const_equiv_p. 

> Maybe the added SUBREG check in curr_insn_transform helps some other corner
> case.  But this case here has nothing to do with it.

Reply via email to