This is the mail archive of the gcc-patches@gcc.gnu.org mailing 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] |
true_regnum also handles:Here is the rest of Intel Atom optimization. OK for trunk?Hm, not true_regnum in the lines above?
+static int
+distance_non_agu_define (rtx op1, rtx op2, rtx insn)
+{
+ unsigned int regno1 = REGNO (op1);
+ unsigned int regno2 = REG_P (op2) ? REGNO (op2) : (unsigned int) -1;
We know op1 is a register and op2 isn't a subreg. Do
we need to call true_regnum?
+ {...
+ insn_type = get_attr_type (prev);
+ if (insn_type != TYPE_LEA)
+ goto done;
+ }
+done:
+ /* Restore recog_data which may be modified by get_attr_type. */
+ extract_insn_cached (insn);
+ return distance;
This can't be right. You are restoring recog data on a different insn that was processed by get_attr_type. I think that extract_insn_cached should immediately follow get_attr_type in order to restore recog data.
We want to restore recog data on the instruction, which is the
parameter, INSN, on which distance_non_agu_define is called.
INSN is unchanged here. Did I miss something?
Thanks, Uros.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |