public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "roger at nextmovesoftware dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105991] [12/13 Regression] rldicl+sldi+add generated instead of rldimi Date: Thu, 16 Jun 2022 07:57:06 +0000 [thread overview] Message-ID: <bug-105991-4-oiljmmiAag@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105991-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105991 Roger Sayle <roger at nextmovesoftware dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2022-06-16 CC| |roger at nextmovesoftware dot com Keywords| |patch Status|UNCONFIRMED |NEW --- Comment #1 from Roger Sayle <roger at nextmovesoftware dot com> --- The following patch appears to correct this for me on a cross-compiler to powerpcle64, but it's tricky for me to do a full bootstrap/regression test. 2022-06-16 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR target/105991 * config/rs6000/rs6000.md (plus_xor): New code iterator. (*rotl<mode>3_insert_3_<code>): New define_insn_and_split. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index c55ee7e..695ec33 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -4188,6 +4188,23 @@ } [(set_attr "type" "insert")]) +; Canonicalize the PLUS and XOR forms to IOR for rotl<mode>3_insert_3 +(define_code_iterator plus_xor [plus xor]) + +(define_insn_and_split "*rotl<mode>3_insert_3_<code>" + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") + (plus_xor:GPR + (and:GPR (match_operand:GPR 3 "gpc_reg_operand" "0") + (match_operand:GPR 4 "const_int_operand" "n")) + (ashift:GPR (match_operand:GPR 1 "gpc_reg_operand" "r") + (match_operand:SI 2 "const_int_operand" "n"))))] + "INTVAL (operands[2]) == exact_log2 (UINTVAL (operands[4]) + 1)" + "#" + "&& 1" + [(set (match_dup 0) + (ior:GPR (and:GPR (match_dup 3) (match_dup 4)) + (ashift:GPR (match_dup 1) (match_dup 2))))]) + (define_code_iterator plus_ior_xor [plus ior xor]) (define_split
next prev parent reply other threads:[~2022-06-16 7:57 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-15 17:09 [Bug target/105991] New: " mpolacek at gcc dot gnu.org 2022-06-15 17:10 ` [Bug target/105991] [12/13 Regression] " mpolacek at gcc dot gnu.org 2022-06-16 7:57 ` roger at nextmovesoftware dot com [this message] 2022-06-16 14:49 ` mpolacek at gcc dot gnu.org 2022-06-16 17:33 ` mpolacek at gcc dot gnu.org 2022-06-18 1:55 ` segher at gcc dot gnu.org 2022-06-18 6:30 ` roger at nextmovesoftware dot com 2022-06-21 23:10 ` cvs-commit at gcc dot gnu.org 2022-06-24 9:49 ` roger at nextmovesoftware dot com 2022-06-24 15:33 ` segher at gcc dot gnu.org 2022-07-04 13:03 ` [Bug target/105991] [12 " cvs-commit at gcc dot gnu.org 2023-04-26 6:56 ` rguenth at gcc dot gnu.org 2023-04-26 8:01 ` roger at nextmovesoftware dot com
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-105991-4-oiljmmiAag@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).