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: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail 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:23:25 +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>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 ();
}
Jakub