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]

Re: [PATCH], V7, #2 of 7, Use PLI to load up 32-bit SImode constants


On Fri, Nov 22, 2019 at 06:20:52PM -0600, Segher Boessenkool wrote:
> On Thu, Nov 14, 2019 at 05:42:43PM -0500, Michael Meissner wrote:
> > -;; Split a load of a large constant into the appropriate two-insn
> > -;; sequence.
> > +;; Split a load of a large constant into the appropriate two-insn sequence.  On
> > +;; systems that support PADDI (PLI), we can use PLI to load any 32-bit constant
> > +;; in one instruction.
> >  
> >  (define_split
> >    [(set (match_operand:SI 0 "gpc_reg_operand")
> >  	(match_operand:SI 1 "const_int_operand"))]
> >    "(unsigned HOST_WIDE_INT) (INTVAL (operands[1]) + 0x8000) >= 0x10000
> > -   && (INTVAL (operands[1]) & 0xffff) != 0"
> > +   && (INTVAL (operands[1]) & 0xffff) != 0 && !TARGET_PREFIXED_ADDR"
> >    [(set (match_dup 0)
> >  	(match_dup 2))
> >     (set (match_dup 0)
> 
> Please use num_insns_constant, instead (and fix num_insns_constant_gpr
> so it knows about SIGNED_34BIT).

The previous patch V6 #1 already had the modification for
num_insns_constant_gpr.

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meissner@linux.ibm.com, phone: +1 (978) 899-4797


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