On Tue, Apr 21, 2015 at 03:13:38PM +0800, Terry Guo wrote:
> > Did you fix the comment?  REG_USERVAR_P and HARD_REGISTER_P can be
> > set for more than just register asm.
> 
> Sorry for missing the patch. I believe that I addressed your patch.
> Please review it again to make sure my understanding is correct.

> +  /* Use REG_USERVAR_P and HARD_REGISTER_P to check whether DEST is a user
> +     specified register, and do not eliminate such register if it is in an
> +     asm input.  Otherwise if allow such elimination, we may break the
> +     register asm usage defined in GCC manual.  */
> +  if (REG_P (dest) && REG_USERVAR_P (dest) && HARD_REGISTER_P (dest)
> +      && extract_asm_operands (PATTERN (i3)))
> +    return 0;

The "to check whether DEST is a user-specified register" part is not
correct; this check can for example also match for function arguments
(which are hard regs) that were combined into any "normal" user var.
I don't see how we would do a better check, and disallowing combination
in this case is harmless (or even good); but the comment is misleading.


Segher

Reply via email to