This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386]: Fix PR 65871, bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Apr 2015 21:31:08 +0200
- Subject: Re: [PATCH, i386]: Fix PR 65871, bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4bk-Urze4OKoHvFx=jCyAsspMNdBntL81czrfE33oYntA at mail dot gmail dot com> <20150429192325 dot GK1751 at tucnak dot redhat dot com>
On Wed, Apr 29, 2015 at 9:23 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Apr 29, 2015 at 09:02:16PM +0200, Uros Bizjak wrote:
>> Hello!
>>
>> Attached patch implements a CCZ-only setting pattern for a couple of
>> BMI[,2] intrinsics.
>
> What about the case when the result is used, but also tested for zero or
> non-zero? Like e.g.
> int bar (void);
> int foo (unsigned int x, unsigned int y)
> {
> int v = __builtin_ia32_bextr_u32 (x, y);
> if (v)
> return v;
> return bar ();
> }
Yes, I have considered this usage, but it would require *another*
pattern. I don't think it is worth just to have one test insn less...
Uros.