public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/100085] Bad code for union transfer from __float128 to vector types
Date: Thu, 15 Apr 2021 06:59:11 +0000	[thread overview]
Message-ID: <bug-100085-4-2dLmfTvkHV@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100085-4@http.gcc.gnu.org/bugzilla/>

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |powerpc
   Last reconfirmed|                            |2021-04-15
     Ever confirmed|0                           |1
           Keywords|                            |missed-optimization
          Component|rtl-optimization            |target
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
RTL expansion for

vui128_t test_xfer_bin128_2_vui128t (__binary128 f128)
{
  vector(1) __int128 unsigned _3;

;;   basic block 2, loop depth 0
;;    pred:       ENTRY
  _3 = VIEW_CONVERT_EXPR<vector(1) __int128 unsigned>(f128_2(D));
  return _3;

power9 (-) vs power8 (+) is

 (note 3 2 6 2 NOTE_INSN_FUNCTION_BEG)
-(insn 6 3 7 2 (set (mem/c:KF (reg/f:DI 112 virtual-stack-vars) [1  S16 A128])
-        (reg/v:KF 118 [ f128 ])) "vec_f128_ppc.h":143:19 -1
-     (nil))
-(insn 7 6 8 2 (set (reg:V1TI 120)
-        (mem/c:V1TI (reg/f:DI 112 virtual-stack-vars) [1  S16 A128]))
"t.c":13:10 -1
+(insn 6 3 7 2 (set (subreg:V1TI (reg:KF 120 [ f128 ]) 0)
+        (rotate:V1TI (subreg:V1TI (reg/v:KF 118 [ f128 ]) 0)
+            (const_int 64 [0x40]))) "vec_f128_ppc.h":143:19 -1
+     (nil))
+(insn 7 6 8 2 (set (mem/c:V1TI (reg/f:DI 112 virtual-stack-vars) [1  S16
A128])
+        (rotate:V1TI (subreg:V1TI (reg:KF 120 [ f128 ]) 0)
+            (const_int 64 [0x40]))) "vec_f128_ppc.h":143:19 -1
+     (nil))
+(insn 8 7 9 2 (set (reg:V2DI 122)
+        (vec_select:V2DI (mem/c:V2DI (reg/f:DI 112 virtual-stack-vars) [1  S16
A128])
+            (parallel [
+                    (const_int 1 [0x1])
+                    (const_int 0 [0])
+                ]))) "t.c":13:10 -1
+     (nil))
+(insn 9 8 10 2 (set (subreg:V2DI (reg:V1TI 121) 0)
+        (vec_select:V2DI (reg:V2DI 122)
+            (parallel [
+                    (const_int 1 [0x1])
+                    (const_int 0 [0])
+                ]))) "t.c":13:10 -1
      (nil))

so power8 avoids the stack but in turn ends up with sth that's not
optimized down the road.

  parent reply	other threads:[~2021-04-15  6:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 18:19 [Bug rtl-optimization/100085] New: " munroesj at gcc dot gnu.org
2021-04-14 18:22 ` [Bug rtl-optimization/100085] " munroesj at gcc dot gnu.org
2021-04-15  6:59 ` rguenth at gcc dot gnu.org [this message]
2021-04-15 18:41 ` [Bug target/100085] " segher at gcc dot gnu.org
2021-04-16 20:30 ` munroesj at gcc dot gnu.org
2021-04-29 15:04 ` munroesj at gcc dot gnu.org
2021-04-30 19:52 ` bergner at gcc dot gnu.org
2021-05-24  6:41 ` luoxhu at gcc dot gnu.org
2021-05-24 21:49 ` segher at gcc dot gnu.org
2021-06-02  8:27 ` luoxhu at gcc dot gnu.org
2021-06-09  5:13 ` luoxhu at gcc dot gnu.org
2021-06-09 21:35 ` bergner at gcc dot gnu.org
2021-06-09 22:08 ` segher at gcc dot gnu.org
2021-06-10 15:00 ` munroesj at gcc dot gnu.org
2021-06-11 20:28 ` segher at gcc dot gnu.org
2022-01-14 17:17 ` wschmidt at gcc dot gnu.org
2022-02-24 20:48 ` munroesj at gcc dot gnu.org
2022-02-24 20:53 ` munroesj at gcc dot gnu.org
2022-02-24 21:17 ` segher at gcc dot gnu.org
2022-02-24 21:22 ` segher at gcc dot gnu.org
2022-02-24 21:26 ` segher at gcc dot gnu.org
2022-02-25 15:31 ` munroesj at gcc dot gnu.org
2022-02-25 22:57 ` segher at gcc dot gnu.org
2022-02-26 16:22 ` munroesj 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-100085-4-2dLmfTvkHV@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).