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

--- Comment #21 from Jeffrey A. Law <law at redhat dot com> ---
So we may be able to address this by setting "do_not_record" if we have
multiple sets in an insn, one of which is a reg->reg copy to a destination that
is mentioned in a REG_UNUSED note.  We'd only need to set it when processing
the set with the destination referenced in the REG_UNUSED note.

If the sets were in different insns, then the reg->reg copy with an unused
destination would be removed as dead.

If the source of the set were anything but a register, then we wouldn't be
getting into the insert_regs routine with the validation check we're tripping.

I suspect there's still a problem if we have multiple sets, one of which is a
nop set.  We may want to proactively address this case too, even if we don't
have a C testcase which triggers it.

Reply via email to