public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "linkw at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/109932] ICE in in extract_insn, at recog.cc:2791 on ppc64le with -mno-vsx
Date: Wed, 24 May 2023 02:23:17 +0000	[thread overview]
Message-ID: <bug-109932-4-JsCNZWJlvv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109932-4@http.gcc.gnu.org/bugzilla/>

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

Kewen Lin <linkw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-05-24
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
                 CC|                            |linkw at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |linkw at gcc dot gnu.org
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from Kewen Lin <linkw at gcc dot gnu.org> ---
Confirmed, thanks for reporting.

Both bif __builtin_pack_vector_int128 and __builtin_unpack_vector_int128 are
put in stanza power7 instead of vsx, so they miss to check vsx available or
not.

  const vsq __builtin_pack_vector_int128 (unsigned long long, \
                                          unsigned long long);
    PACK_V1TI packv1ti {}

  void __builtin_ppc_speculation_barrier ();
    SPECBARR speculation_barrier {}

  const unsigned long __builtin_unpack_vector_int128 (vsq, const int<1>);
    UNPACK_V1TI unpackv1ti {}

But the underlying insn patterns do need VSX support, see:

(define_insn "pack<mode>"
  [(set (match_operand:FMOVE128_VSX 0 "register_operand" "=wa")
        (unspec:FMOVE128_VSX
         [(match_operand:DI 1 "register_operand" "wa")
          (match_operand:DI 2 "register_operand" "wa")]
         UNSPEC_PACK_128BIT))]
  "TARGET_VSX"   // here
  "xxpermdi %x0,%x1,%x2,0"
  [(set_attr "type" "vecperm")])

(define_insn "unpack<mode>"
  [(set (match_operand:DI 0 "register_operand" "=wa,wa")
        (unspec:DI [(match_operand:FMOVE128_VSX 1 "register_operand" "0,wa")
                    (match_operand:QI 2 "const_0_to_1_operand" "O,i")]
         UNSPEC_UNPACK_128BIT))]
  "VECTOR_MEM_ALTIVEC_OR_VSX_P (<MODE>mode)"  // here
{
  if (REGNO (operands[0]) == REGNO (operands[1]) && INTVAL (operands[2]) == 0)
    return ASM_COMMENT_START " xxpermdi to same register";

  operands[3] = GEN_INT (INTVAL (operands[2]) == 0 ? 0 : 3);
  return "xxpermdi %x0,%x1,%x1,%3";
}
  [(set_attr "type" "vecperm")])

; Iterator for 128-bit VSX types for pack/unpack
(define_mode_iterator FMOVE128_VSX [V1TI KF])

both vector_mem for V1TI and KF are VSX.

So the fix would be to move these two bifs to be under stanza vsx.

  reply	other threads:[~2023-05-24  2:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 17:05 [Bug target/109932] New: " jamborm at gcc dot gnu.org
2023-05-24  2:23 ` linkw at gcc dot gnu.org [this message]
2023-06-12  6:10 ` [Bug target/109932] " cvs-commit at gcc dot gnu.org
2023-06-13  8:08 ` cvs-commit at gcc dot gnu.org
2023-06-20  3:20 ` cvs-commit at gcc dot gnu.org
2023-06-20  3:20 ` cvs-commit at gcc dot gnu.org
2023-06-20  3:21 ` cvs-commit at gcc dot gnu.org
2023-06-20  3:21 ` cvs-commit at gcc dot gnu.org
2023-06-20  8:24 ` cvs-commit at gcc dot gnu.org
2023-06-20  9:30 ` cvs-commit at gcc dot gnu.org
2023-06-20  9:42 ` linkw 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-109932-4-JsCNZWJlvv@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).