Paolo Bonzini - [PATCH] fix pr30841 part 1, fwprop oversight (original) (raw)

This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

At last a 4.3 regression due to fwprop. ;-)In this regression, fwprop must perform proper addressing mode selection, or a read/modify/write instruction takes 4 insns and combine cannot synthesize it. For two unrelated reasons, however, this fails to happen.This first part is simpler and is actually an oversight. fwprop dismisses transformations that do not match the original operand's mode; however it is necessary to make an exception for CONST_INTs since these have VOIDmode.This improves the situation a bit, but it only propagates the address into the "read" and not into the write. The reason for this is a bug in df, which fails to properly support the incremental df updates performed by fwprop. The patch for this will not be needed on dataflow branch, hence I'm submitting it separately.Bootstrapped/regtested i686-pc-linux-gnu, ok for mainline?Paolo

2007-02-22 Paolo Bonzini bonzini@gnu.org

* fwprop.c (propagate_rtx_1): Accept CONST_INTs even if they don't match
the original mode.

Index: fwprop.c

--- fwprop.c (revision 121883) +++ fwprop.c (working copy) @@ -324,7 +324,8 @@ propagate_rtx_1 (rtx px, rtx old, rtx n / Dismiss transformation that we do not want to carry on. */ if (!valid_ops || new_op0 == op0 - || GET_MODE (new_op0) != GET_MODE (op0)) + || (GET_MODE (new_op0) != GET_MODE (op0) + && GET_CODE (new_op0) != CONST_INT)) return true;

   canonicalize_address (new_op0);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]