public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/105513] [9/10/11/12/13 Regression] Unnecessary SSE spill since r9-5748-g1d4b4f4979171ef0
Date: Fri, 20 May 2022 09:12:03 +0000	[thread overview]
Message-ID: <bug-105513-4-zjWAaT2Rdw@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105513-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Alexander Monakov from comment #7)
> The second sequence is 3 uops vs 1/2 (issued/executed) uops in first, and on
> Haswell and Skylake it ties up port 5 for two cycles.
> 
> Unclear if you're microbenchmarking latency or throughput, but in any case
> on Haswell and Skylake you should see a close to 2x difference.

I'm counting clocksticks, and thought a load may take more latency.

#include <stdio.h>
#include <stdlib.h>
#include <x86intrin.h>

#define LOOP 1000000000
typedef long v2di __attribute__((vector_size(16)));
typedef int v4si __attribute__((vector_size(16)));

v2di
__attribute__ ((noipa))
foo (v2di a)
{
        a[1] = 111113;
        return a;
}

void
__attribute__ ((noipa))
foo1 (v2di a)
{
}

int
main ()
{
  int i;
  unsigned long long start, end;
  unsigned long long diff;
  unsigned int aux;

  start = __rdtscp (&aux);
  v2di b = __extension__ (v2di){111, 222};
  for (i = 0; i < LOOP; i++)
    {
      v2di a = foo (b);
      foo1 (a);
    }
  end = __rdtscp (&aux);
  diff = end - start;
  printf ("alterna: %lld\n", diff);

  return 0;
}

  parent reply	other threads:[~2022-05-20  9:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-07  8:24 [Bug rtl-optimization/105513] New: [9/10/11/12/13 Regression] Unnecessary SSE spill amonakov at gcc dot gnu.org
2022-05-09  6:50 ` [Bug rtl-optimization/105513] [9/10/11/12/13 Regression] Unnecessary SSE spill since r9-5748-g1d4b4f4979171ef0 marxin at gcc dot gnu.org
2022-05-09  6:57 ` [Bug target/105513] " pinskia at gcc dot gnu.org
2022-05-09  8:05 ` rguenth at gcc dot gnu.org
2022-05-09 13:32 ` crazylht at gmail dot com
2022-05-10  7:24 ` ubizjak at gmail dot com
2022-05-13  7:10 ` crazylht at gmail dot com
2022-05-16  3:06 ` crazylht at gmail dot com
2022-05-20  8:29 ` crazylht at gmail dot com
2022-05-20  9:02 ` amonakov at gcc dot gnu.org
2022-05-20  9:12 ` crazylht at gmail dot com [this message]
2022-05-27  9:48 ` [Bug target/105513] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-08  3:24 ` cvs-commit at gcc dot gnu.org
2022-06-28 10:49 ` jakub at gcc dot gnu.org
2023-07-07 10:43 ` [Bug target/105513] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-02-21  4:52 ` pinskia 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-105513-4-zjWAaT2Rdw@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).