This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Insn canonicalization not only with constant
- From: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- To: Sami Khawam <S dot Khawam at ee dot ed dot ac dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 14 Feb 2007 19:09:20 +0100
- Subject: Re: Insn canonicalization not only with constant
- References: <45D34778.8000303@ee.ed.ac.uk>
On Wed, Feb 14, 2007 at 05:31:36PM +0000, Sami Khawam wrote:
> (define_insn "scale_28_4"
> [(set (match_operand:SI 0 "register_operand" "=r")
> (ior:SI
> (ashift:SI (match_operand:SI 1 "register_operand" "r")
> (const_int 28 ))
> (lshiftrt:SI (match_operand:SI 2 "register_operand" "r")
> (const_int 4))
> ))]
> ""
> "SCALE_28_4 tout= %0 in1= %1 tin2= %2"
> [(set_attr "type" "logic")
> (set_attr "length" "1")])
>
> Instruction canonicalization doesn't work, since as explained in
> http://gcc.gnu.org/onlinedocs/gccint/Insn-Canonicalizations.html
> it only works if the second operand is a constant.
It is not clear what isn't being canonicalized. Please provide an example
of an insn which isn't canonical and what it should look like canonicalized.
--
Rask Ingemann Lambertsen