public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106342] [12/13 Regression] internal compiler error: in extract_insn, at recog.cc:2791 since r12-4240-g2b8453c401b699 Date: Thu, 28 Jul 2022 17:08:15 +0000 [thread overview] Message-ID: <bug-106342-4-oD0cbbxmiG@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106342-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106342 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |iii at gcc dot gnu.org, | |jakub at gcc dot gnu.org, | |krebbel at gcc dot gnu.org --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think the problem is in the r11-3816-ga1a10a0b8c4e161070f88de3af9d20f9f866a23f change. The "copysign<mode>3" expander in config/s390/vector.md uses VFT iterator, I assume if_then_else form it was using has intructions covering all those modes, but after the change it attempts to match the "vsel<mode>" pattern from config/s390/vx-builtins.md, which uses just the V_HW iterator. VFT is V1DF V2DF without TARGET_VXE and V1SF V2SF V4SF V1DF V2DF V1TF TF with TARGET_VXE, while V_HW is V16QI V8HI V4SI V2DI V2DF without TARGET_VXE and V16QI V8HI V4SI V2DI V1TI V2DF V4SF V1TF TF with TARGET_VXE. So, for V1SF V2SF V1DF modes copysign pattern will expand to something that will not match an actual pattern. So, either "copysign<mode>3" expander in config/s390/vector.md should use VF_HW iterator instead of VFT (and thus not support V1SF, V2SF and V1DF modes), or because presumably vsel doesn't raise exceptions, it could just use a wider mode for those cases. Thus, either: --- gcc/config/s390/vector.md.jj 2022-01-11 23:11:21.985295845 +0100 +++ gcc/config/s390/vector.md 2022-07-28 17:39:19.968033927 +0200 @@ -1723,12 +1723,12 @@ ; Vector copysign, implement using vector select (define_expand "copysign<mode>3" - [(set (match_operand:VFT 0 "register_operand" "") - (ior:VFT - (and:VFT (match_operand:VFT 2 "register_operand" "") - (match_dup 3)) - (and:VFT (not:VFT (match_dup 3)) - (match_operand:VFT 1 "register_operand" ""))))] + [(set (match_operand:VF_HW 0 "register_operand" "") + (ior:VF_HW + (and:VF_HW (match_operand:VF_HW 2 "register_operand" "") + (match_dup 3)) + (and:VF_HW (not:VF_HW (match_dup 3)) + (match_operand:VF_HW 1 "register_operand" ""))))] "TARGET_VX" { rtx mask = s390_build_signbit_mask (<MODE>mode); or perhaps something like: --- gcc/config/s390/vector.md.jj 2022-01-11 23:11:21.985295845 +0100 +++ gcc/config/s390/vector.md 2022-07-28 19:02:06.527108712 +0200 @@ -1721,6 +1721,13 @@ operands[4] = CONST0_RTX (V2DImode); }) +(define_mode_attr hw_vec[(V1SF "V4SF") (V2SF "V4SF") (V4SF "V4SF") + (V1DF "V2DF") (V2DF "V2DF") + (V1TF "V1TF") (TF "TF")]) +(define_mode_attr hw_vec_l[(V1SF "v4sf") (V2SF "v4sf") (V4SF "v4sf") + (V1DF "v2df") (V2DF "v2df") + (V1TF "v1tf") (TF "tf")]) + ; Vector copysign, implement using vector select (define_expand "copysign<mode>3" [(set (match_operand:VFT 0 "register_operand" "") @@ -1731,6 +1738,20 @@ (match_operand:VFT 1 "register_operand" ""))))] "TARGET_VX" { + if (GET_MODE_SIZE (<MODE>mode) < 16) + { + rtx op0 = gen_reg_rtx (<hw_vec>mode), op1, op2; + op1 = simplify_gen_subreg (<hw_vec>mode, + force_reg (<MODE>mode, operands[1]), + <MODE>mode, 0); + op2 = simplify_gen_subreg (<hw_vec>mode, + force_reg (<MODE>mode, operands[2]), + <MODE>mode, 0); + emit_insn (gen_copysign<hw_vec_l>3 (op0, op1, op2)); + emit_move_insn (operands[0], + simplify_gen_subreg (<MODE>mode, op0, <hw_vec>mode, 0)); + DONE; + } rtx mask = s390_build_signbit_mask (<MODE>mode); operands[3] = force_reg (<MODE>mode, mask); }) (dunno whether to use simplify_gen_subreg or lowpart_subreg or simplify_gen_subreg with 8).
next prev parent reply other threads:[~2022-07-28 17:08 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-18 15:32 [Bug target/106342] New: [12/13 Regression] internal compiler error: in extract_insn, at recog.cc:2791 mpolacek at gcc dot gnu.org 2022-07-18 15:33 ` [Bug target/106342] " mpolacek at gcc dot gnu.org 2022-07-18 15:35 ` mpolacek at gcc dot gnu.org 2022-07-19 6:40 ` rguenth at gcc dot gnu.org 2022-07-19 10:34 ` marxin at gcc dot gnu.org 2022-07-19 18:09 ` mpolacek at gcc dot gnu.org 2022-07-20 8:13 ` [Bug target/106342] [12/13 Regression] internal compiler error: in extract_insn, at recog.cc:2791 since r12-4240-g2b8453c401b699 marxin at gcc dot gnu.org 2022-07-28 17:08 ` jakub at gcc dot gnu.org [this message] 2022-07-28 22:29 ` iii at linux dot ibm.com 2022-07-29 7:31 ` jakub at gcc dot gnu.org 2022-08-10 10:36 ` jakub at gcc dot gnu.org 2023-04-19 14:32 ` [Bug target/106342] [12/13/14 " iii at linux dot ibm.com 2023-05-08 12:25 ` rguenth at gcc dot gnu.org 2024-03-15 1:15 ` law 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-106342-4-oD0cbbxmiG@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: linkBe 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).