This is the mail archive of the gcc@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]

Re: Impact assessment of dse.c:emit_inc_dec_insn_before (Was: Re: Use of FLAGS_REGNUM clashes with generates insn)


Quoting DJ Delorie <dj@redhat.com>:


m32c.c:m32c_legitimate_address_p allows any rubbish inside a
PRE_MODIFY, as long as the address register is the stack pointer.
OTOH, it does not define any HAVE_*_MODIFY_* macro.

m32c has push/pop and no other pre/post modify
I was talking about what addresses are allowed by
the TARGET_LEGITIMATE_ADDRESS_P, not what the hardware implements or
what the register allocator is guided to produce; some optimizers can
get quite 'creative' in mashing rtl together.

Considering the following stanza from m32c_legitimate_address_p,
I don't see how it would reject
(pre_modify:HI
  (reg:CC SP_REGNO)
  (cond_exec:V2HI (pc:SC)
                  (if_then_else:PSI (scratch:BLK) (reg 4004) (return:QI))))


/* allowing PLUS yields mem:HI(plus:SI(mem:SI(plus:SI in m32c_split_move */ if (GET_CODE (x) == PRE_DEC || GET_CODE (x) == POST_INC || GET_CODE (x) == PRE_MODIFY) { return (GET_CODE (XEXP (x, 0)) == REG && REGNO (XEXP (x, 0)) == SP_REGNO); }


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