This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to explicitly state in md pattern that I expect bitwise zero target?
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Konstantin Vladimirov <konstantin dot vladimirov at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 26 Oct 2012 04:07:37 -0700
- Subject: Re: How to explicitly state in md pattern that I expect bitwise zero target?
- References: <CADn89gQsZau=bS6mLMHd==ixX1kg6EA8gVg3eF_HsVWT3cbMVQ@mail.gmail.com>
On Fri, Oct 26, 2012 at 1:49 AM, Konstantin Vladimirov
<konstantin.vladimirov@gmail.com> wrote:
> Hi,
>
> Consider I have pattern like:
>
> (define_insn "big_combined_one"
> [(set (match_operand:SI 0 ...)
> (ior:SI (and:SI (lshiftrt:SI (match_operand:SI 1 ...)
> (match_operand:SI 2 ...))
> (match_operand:SI 3 ...))
> (and:SI (lshiftrt:SI (match_dup 1)
> (match_operand:SI 4 ...))
> (match_operand:SI 5 ...))))]
>
> I can match it as one instruction, only if target operand is proven to
> be bitwise zero, that is very often case for this pattern.
>
> But how can I decide if it is so?
What do you mean the target operand is proven to be bitwise zero?
This pattern sets all of operand 0 and does touch use it. I think you
want to have an explicit use of the operand in the pattern.
Thanks,
Andrew Pinski