On 03/31/2011 03:19 AM, Richard Sandiford wrote:
>       * recog.h (insn_operand_data): Add an "allows_mem" field.
>       * genoutput.c (output_operand_data): Initialize it.
>       * optabs.c (maybe_legitimize_operand_same_code): New function.
>       (maybe_legitimize_operand): Use it when matching the original
>       op->value.

Ok, with

>    old_volatile_ok = volatile_ok;
>    mode = op->mode;
> -  result = false;
>    switch (op->type)
>      {
>      case EXPAND_FIXED:
>        volatile_ok = true;
> -      break;
> +      result = maybe_legitimize_operand_same_code (icode, opno, op);
> +      volatile_ok = old_volatile_ok;
> +      return result;

You can now move all references to volatile_ok into this case.

> +      return insn_operand_matches (icode, opno, op->value);
...
> +      return insn_operand_matches (icode, opno, op->value);
...
> +      return insn_operand_matches (icode, opno, op->value);

And leave this common call at the end of the function.


r~

Reply via email to