[i386 PATCH] Disallow (set reg (op mem const)) addressing modes (take 3)
Jan Hubicka
jh@suse.cz
Thu Jan 25 16:43:00 GMT 2007
>
Hi,
> +
> + /* Highest priority is that src1 should match dst. */
> + if (rtx_equal_p (dst, src1))
> + return false;
> + if (rtx_equal_p (dst, src2))
> + return true;
> +
> + /* Next highest priority is that immediate constants come second. */
> + if (immediate_operand (src2, mode))
> + return false;
> + if (immediate_operand (src1, mode))
> + return true;
> +
> + /* Lowest priority is that memory references should come second. */
> + if (MEM_P (src2))
> + return false;
> + if (MEM_P (src1))
> + return true;
Thank you for writting this - I believe it is a lot more readable
now.
> /* Both source operands cannot be in memory. */
> if (MEM_P (src1) && MEM_P (src2))
> {
> ! /* Optimization: Only read from memory once. */
> ! if (rtx_equal_p (src1, src2))
Interesting, this is new as well, right?
Thanks, the patch looks OK to me now.
Honza
More information about the Gcc-patches
mailing list