public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Kewen.Lin" <linkw@linux.ibm.com>
To: gcc-patches@gcc.gnu.org
Cc: segher@kernel.crashing.org, dje.gcc@gmail.com,
	bergner@linux.ibm.com, meissner@linux.ibm.com
Subject: PING^3 [PATCH 0/9] rs6000: Rework rs6000_emit_vector_compare
Date: Thu, 15 Jun 2023 14:38:12 +0800	[thread overview]
Message-ID: <804f6ee1-eb62-ea72-648e-1ac9036d0606@linux.ibm.com> (raw)
In-Reply-To: <73b2a139-0664-6dda-13c1-622d51745b30@linux.ibm.com>

Hi,

Gentle ping this series:

https://gcc.gnu.org/pipermail/gcc-patches/2022-November/607146.html

BR,
Kewen

> 
>>
>> on 2022/11/24 17:15, Kewen Lin wrote:
>>> Hi,
>>>
>>> Following Segher's suggestion, this patch series is to rework
>>> function rs6000_emit_vector_compare for vector float and int
>>> in multiple steps, it's based on the previous attempts [1][2].
>>> As mentioned in [1], the need to rework this for float is to
>>> make a centralized place for vector float comparison handlings
>>> instead of supporting with swapping ops and reversing code etc.
>>> dispersedly.  It's also for a subsequent patch to handle
>>> comparison operators with or without trapping math (PR105480).
>>> With the handling on vector float reworked, we can further make
>>> the handling on vector int simplified as shown.
>>>
>>> For Segher's concern about whether this rework causes any
>>> assembly change, I constructed two testcases for vector float[3]
>>> and int[4] respectively before, it showed the most are fine
>>> excepting for the difference on LE and UNGT, it's demonstrated
>>> as improvement since it uses GE instead of GT ior EQ.  The
>>> associated test case in patch 3/9 is a good example.
>>>
>>> Besides, w/ and w/o the whole patch series, I built the whole
>>> SPEC2017 at options -O3 and -Ofast separately, checked the
>>> differences on object assembly.  The result showed that the
>>> most are unchanged, except for:
>>>
>>>   * at -O3, 521.wrf_r has 9 object files and 526.blender_r has
>>>     9 object files with differences.
>>>
>>>   * at -Ofast, 521.wrf_r has 12 object files, 526.blender_r has
>>>     one and 527.cam4_r has 4 object files with differences.
>>>
>>> By looking into these differences, all significant differences
>>> are caused by the known improvement mentined above transforming
>>> GT ior EQ to GE, which can also affect unrolling decision due
>>> to insn count.  Some other trivial differences are branch
>>> target offset difference, nop difference for alignment, vsx
>>> register number differences etc.
>>>
>>> I also evaluated the runtime performance for these changed
>>> benchmarks, the result is neutral.
>>>
>>> These patches are bootstrapped and regress-tested
>>> incrementally on powerpc64-linux-gnu P7 & P8, and
>>> powerpc64le-linux-gnu P9 & P10.
>>>
>>> Is it ok for trunk?
>>>
>>> BR,
>>> Kewen
>>> -----
>>> [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606375.html
>>> [2] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606376.html
>>> [3] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606504.html
>>> [4] https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606506.html
>>>
>>> Kewen Lin (9):
>>>   rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p1
>>>   rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p2
>>>   rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p3
>>>   rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p4
>>>   rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p1
>>>   rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p2
>>>   rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p3
>>>   rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p4
>>>   rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p5
>>>
>>>  gcc/config/rs6000/rs6000.cc                 | 180 ++++++--------------
>>>  gcc/testsuite/gcc.target/powerpc/vcond-fp.c |  25 +++
>>>  2 files changed, 74 insertions(+), 131 deletions(-)
>>>  create mode 100644 gcc/testsuite/gcc.target/powerpc/vcond-fp.c
>>>

  reply	other threads:[~2023-06-15  6:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-24  9:15 Kewen Lin
2022-11-24  9:15 ` [PATCH 1/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p1 Kewen Lin
2022-11-24  9:15 ` [PATCH 2/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p2 Kewen Lin
2022-11-24  9:15 ` [PATCH 3/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p3 Kewen Lin
2022-11-24  9:15 ` [PATCH 4/9] rs6000: Rework vector float comparison in rs6000_emit_vector_compare - p4 Kewen Lin
2022-11-24  9:15 ` [PATCH 5/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p1 Kewen Lin
2022-11-24  9:15 ` [PATCH 6/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p2 Kewen Lin
2022-11-24  9:15 ` [PATCH 7/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p3 Kewen Lin
2022-11-24  9:15 ` [PATCH 8/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p4 Kewen Lin
2022-11-24  9:15 ` [PATCH 9/9] rs6000: Rework vector integer comparison in rs6000_emit_vector_compare - p5 Kewen Lin
2022-12-14 11:23 ` PING^1 [PATCH 0/9] rs6000: Rework rs6000_emit_vector_compare Kewen.Lin
2023-05-17  6:26   ` PING^2 " Kewen.Lin
2023-06-15  6:38     ` Kewen.Lin [this message]
2023-07-06 21:54       ` PING^3 " Michael Meissner
2023-08-07 10:05       ` PING^4 " Kewen.Lin
2023-10-25  2:47         ` PING^5 " Kewen.Lin
2023-11-08  2:50           ` PING^6 " Kewen.Lin
2023-12-04  9:50             ` PING^7 " Kewen.Lin
2023-12-12  6:08               ` PING^8 " 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=804f6ee1-eb62-ea72-648e-1ac9036d0606@linux.ibm.com \
    --to=linkw@linux.ibm.com \
    --cc=bergner@linux.ibm.com \
    --cc=dje.gcc@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=meissner@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).