This is the mail archive of the
mailing list for the GCC project.
Re: how to check if target supports andnot instruction ?
- From: Prathamesh Kulkarni <prathamesh dot kulkarni at linaro dot org>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>
- Date: Wed, 12 Oct 2016 13:15:32 +0530
- Subject: Re: how to check if target supports andnot instruction ?
- Authentication-results: sourceware.org; auth=none
- References: <CAAgBjMkJfLh=OsbkwHt4fw=_kazop2rZ2NfWoor62aHSSj=aPg@mail.gmail.com>
On 12 October 2016 at 13:09, Prathamesh Kulkarni
> I was having a look at PR71636 and added the following pattern to match.pd:
> x & ((1U << b) - 1) -> x & ~(~0U << b)
> However the transform is useful only if the target supports "andnot"
> As pointed out by Marc in PR for -march=core2, lhs generates worse
> code than rhs,
oops, I meant to say rhs generates worse code than lhs for target not
> so we shouldn't do the transform if target doesn't support andnot insn.
> (perhaps we could do the reverse transform for target not supporting andnot?)
> However it seems andnot isn't a standard pattern name, so am not sure
> how to check
> if target supports andnot insn ?