13.18.2 RTL to RTL Peephole Optimizers

The define_peephole2 definition tells the compiler how to
substitute one sequence of instructions for another sequence,
what additional scratch registers may be needed and what their
lifetimes must be.

The definition is almost identical to define_split
(see Insn Splitting) except that the pattern to match is not a
single instruction, but a sequence of instructions.

It is possible to request additional scratch registers for use in the
output template. If appropriate registers are not free, the pattern
will simply not match.

Scratch registers are requested with a match_scratch pattern at
the top level of the input pattern. The allocated register (initially) will
be dead at the point requested within the original sequence. If the scratch
is used at more than a single point, a match_dup pattern at the
top level of the input pattern marks the last position in the input sequence
at which the register must be available.

This pattern tries to split a load from its use in the hopes that we'll be
able to schedule around the memory load latency. It allocates a single
SImode register of class GENERAL_REGS ("r") that needs
to be live only at the point just before the arithmetic.