public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jamrial at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/65871] bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag
Date: Mon, 04 May 2015 03:03:00 -0000	[thread overview]
Message-ID: <bug-65871-4-zS0ivASi0J@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65871-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65871

--- Comment #7 from James Almer <jamrial at gmail dot com> ---
Thanks for the above fix.

I forgot to test BMI1's andn. That one should have an insn modeled this way as
well.

int foo (unsigned int x, unsigned int y)
{
    if (~x & y)
        return 1;
    return 0;
}


gcc -O2 -mbmi -c andn.c

0000000000000000 <foo>:
   0:   c4 e2 40 f2 fe          andn   %esi,%edi,%edi
   5:   31 c0                   xor    %eax,%eax
   7:   85 ff                   test   %edi,%edi
   9:   0f 95 c0                setne  %al
   c:   c3                      retq

http://www.felixcloutier.com/x86/ANDN.html


  parent reply	other threads:[~2015-05-04  3:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-65871-4@http.gcc.gnu.org/bugzilla/>
2015-04-28 12:58 ` ubizjak at gmail dot com
2015-04-28 13:06 ` ubizjak at gmail dot com
2015-04-28 16:29 ` jamrial at gmail dot com
2015-04-29 18:53 ` uros at gcc dot gnu.org
2015-04-29 20:59 ` uros at gcc dot gnu.org
2015-05-04  3:03 ` jamrial at gmail dot com [this message]
2015-05-05  4:36 ` uros at gcc dot gnu.org
2015-06-18 23:20 ` jamrial at gmail dot com
2015-06-21  9:57 ` ubizjak at gmail dot com
2015-06-22 13:55 ` uros at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-65871-4-zS0ivASi0J@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).