public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/42881] [4.5 Regression] SSE2 intrinsics miscompiled at -O0 -march=k8
Date: Wed, 27 Jan 2010 16:17:00 -0000	[thread overview]
Message-ID: <20100127161646.28813.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42881-16957@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-01-27 16:16 -------
At -O0 I see in .optimized:

<bb 2>:
  __F_7 = 3.0e+0;
  D.6259_8 = {__F_7, __F_7};
  D.6258_11 = D.6259_8;
  x.0_1 = D.6258_11;
  x = x.0_1;
  x.1_2 = x;
  __P_9 = &a[0];
  __A_10 = x.1_2;
  __builtin_ia32_storeupd (__P_9, __A_10);
  D.6247_3 = a[1];
  D.6248_4 = a[0];
  D.6249_5 = (const char * restrict) &"%f %f\n"[0];
  printf (D.6249_5, D.6248_4, D.6247_3);
  D.6250_6 = 0;
  return D.6250_6;

nothing wrong here sofar.  But we expand:

;; D.6259_8 = {__F_7, __F_7};

(insn 7 6 8 /usr/lib64/gcc/x86_64-suse-linux/4.5/include/emmintrin.h:65 (set
(reg:V2DF 68)
        (vec_duplicate:V2DF (reg:DF 69))) 1501 {vec_dupv2df} (nil))

(insn 8 7 9 /usr/lib64/gcc/x86_64-suse-linux/4.5/include/emmintrin.h:65 (set
(reg:DF 69)
        (mem/c/i:DF (plus:DI (reg/f:DI 54 virtual-stack-vars)
                (const_int -8 [0xfffffffffffffff8])) [0 __F+0 S8 A64])) -1
(nil))

(insn 9 8 0 /usr/lib64/gcc/x86_64-suse-linux/4.5/include/emmintrin.h:65 (set
(reg:V2DF 64 [ D.6259 ])
        (reg:V2DF 68)) -1 (nil))

whoops.  We duplicate reg:DF 69 before setting it.  That works ok in 4.4.

My bet is SSA expand.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |matz at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|inline-asm                  |middle-end
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
           Priority|P3                          |P1
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-27 16:16:46
               date|                            |
            Summary|SSE2 intrinsics miscompiled |[4.5 Regression] SSE2
                   |at -O0 -march=k8            |intrinsics miscompiled at -
                   |                            |O0 -march=k8
   Target Milestone|---                         |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42881


  reply	other threads:[~2010-01-27 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 11:03 [Bug inline-asm/42881] New: " bugs at 59A2 dot org
2010-01-27 16:17 ` rguenth at gcc dot gnu dot org [this message]
2010-01-27 17:29 ` [Bug target/42881] [4.5 Regression] " matz at gcc dot gnu dot org
2010-01-28 14:12 ` matz at gcc dot gnu dot org
2010-01-28 14:40 ` matz at gcc dot gnu dot 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=20100127161646.28813.qmail@sourceware.org \
    --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).