PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Thu Oct 13 21:35:00 GMT 2011


> Does it look OK?

No.  

If I understand your code correctly, there's essentially the same code
as you have a bit above that:

      /* If the constant is one less than a power of two, this might be 
         representable by an extraction even if no shift is present. 
         If it doesn't end up being a ZERO_EXTEND, we will ignore it unless
         we are in a COMPARE.  */
      else if ((i = exact_log2 (INTVAL (XEXP (x, 1)) + 1)) >= 0)
        new_rtx = make_extraction (mode,
                               make_compound_operation (XEXP (x, 0),
                                                        next_code),
                               0, NULL_RTX, i, 1, 0, in_code == COMPARE);

So you need to understand why your code "fires" and it doesn't.



More information about the Gcc-patches mailing list