From: Carl Love <cel@us.ibm.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: Peter Bergner <bergner@vnet.ibm.com>,
Segher Boessenkool <segher@kernel.crashing.org>,
gcc-patches@gcc.gnu.org, David Edelsohn <dje.gcc@gmail.com>
Subject: Re: [PATCH] rs6000: Update the vsx-vector-6.* tests.
Date: Mon, 03 Jul 2023 08:57:44 -0700 [thread overview]
Message-ID: <fce7afb164bc103dbd0f75cc7e6c4f9c8ed8904e.camel@us.ibm.com> (raw)
In-Reply-To: <d176fbc44ba6a4c43092c0a53718acaba3b04d31.camel@us.ibm.com>
Kewen:
On Fri, 2023-06-30 at 15:20 -0700, Carl Love wrote:
> Segher never liked the above way of looking at the assembly. He
> prefers:
> gcc -S -g -mcpu=power8 -o vsx-vector-6-func-2lop.s vsx-vector-6-
> func-
> 2lop.c
>
> grep xxlor vsx-vector-6-func-2lop.s | wc
> 34 68 516
>
> So, again, I get the same count of 34 on both makalu and genoa. But
> again, that doesn't agree with what make script/scan-assembler thinks
> the counts should be.
>
> When I looked at the vsx-vector-6-func-2lop.s I see on BE:
>
> ....
> lxvd2x 0,10,9
> xxlor 0,12,0
> xxlnor 0,0,0
> ...
>
> I was guessing that it was adjusting the data layout from the load.
> But looking again more carefully versus LE:
>
> ....
> lxvd2x 0,31,9
> xxpermdi 0,0,0,2
> xxlor 0,12,0
> xxlnor 0,0,0
> xxpermdi 0,0,0,2
> ....
>
> the xxpermdi is probably what is really doing the data layout change.
>
> So, we have the issue that looking at the assembly gives different
> instruction counts then what
>
> dg-final { scan-assembler-times {\mxxlor\M} }
>
> comes up with??? Now I am really confused. I don't know how the
> scan-
> assembler-times works but I will go see if I can find it and see if I
> can figure out what the issue is. I would expect that the scan-
> assembler is working off the --save-temp files, which get deleted as
> part of the run. I would guess that scan-assembler does a grep to
> find
> the instructions and then maybe uses wc to count them??? I will go
> see
> if I can figure out how scan-assembler-times works.
OK, I figured out why I was getting 34 xxlor instructions instead of
the 22 that the scan-assembler-times was getting. The difference was
when I compiled the program I forgot to use -O2. So with -O2 I get the
same number of xxlor instructins as scan-assembler-instructions. I get
34 if I do not specify optimization.
So, I think the scan-assembler-times are all correct.
As Peter says, counting xxlor is a bit problematic in general. We
could just drop counting xxlor or have the LE/BE count qualifier for
the instructions. Your call.
Carl
next prev parent reply other threads:[~2023-07-03 15:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-30 20:46 Carl Love
2023-06-19 7:17 ` Kewen.Lin
2023-06-21 22:42 ` Carl Love
2023-06-28 8:35 ` Kewen.Lin
2023-06-29 21:36 ` Carl Love
2023-06-30 3:37 ` Kewen.Lin
2023-06-30 22:20 ` Carl Love
2023-06-30 23:50 ` Carl Love
2023-07-01 0:03 ` Peter Bergner
2023-06-30 23:59 ` Peter Bergner
2023-07-03 15:57 ` Carl Love [this message]
2023-07-04 2:08 ` Kewen.Lin
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=fce7afb164bc103dbd0f75cc7e6c4f9c8ed8904e.camel@us.ibm.com \
--to=cel@us.ibm.com \
--cc=bergner@vnet.ibm.com \
--cc=dje.gcc@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=linkw@linux.ibm.com \
--cc=segher@kernel.crashing.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).