public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/101796] Miss optimization to optimized (vashl op0, (op1: const_duplicate_vector)) to (ashl op0 op1_inner)
Date: Fri, 27 Aug 2021 07:34:55 +0000 [thread overview]
Message-ID: <bug-101796-4-x4CnRkX5RT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-101796-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101796
--- Comment #4 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Andrew Pinski from comment #3)
> Combine is able to do the combine but it fails as it does not match:
> Trying 10, 9 -> 14:
> 10: r92:HI=0x3
> 9: r91:V32HI=vec_duplicate(r92:HI)
> REG_DEAD r92:HI
> REG_EQUAL const_vector
> 14: r88:V32HI=r96:V8DI#0 0>>r91:V32HI
> REG_DEAD r96:V8DI
> REG_DEAD r91:V32HI
> Failed to match this instruction:
> (set (reg:V32HI 88)
> (lshiftrt:V32HI (subreg:V32HI (reg:V8DI 96) 0)
> (const_vector:V32HI [
> (const_int 3 [0x3]) repeated x32
> ])))
>
> This instruction does not have alt for the dup/const_vect case I think:
> (define_insn "<avx2_avx512>_<insn>v<mode><mask_name>"
> [(set (match_operand:VI2_AVX512VL 0 "register_operand" "=v")
> (any_lshift:VI2_AVX512VL
> (match_operand:VI2_AVX512VL 1 "register_operand" "v")
> (match_operand:VI2_AVX512VL 2 "nonimmediate_operand" "vm")))]
> "TARGET_AVX512BW"
> "vp<vshift>v<ssemodesuffix>\t{%2, %1, %0<mask_operand3>|%0<mask_operand3>,
> %1, %2}"
> [(set_attr "type" "sseishft")
> (set_attr "prefix" "maybe_evex")
> (set_attr "mode" "<sseinsnmode>")])
>
> Note I don't think simplify-rtx will change const_vector to just 3 though.
Yes, it's rejected at
https://gcc.gnu.org/pipermail/gcc-patches/2021-August/576837.html
next prev parent reply other threads:[~2021-08-27 7:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-06 3:22 [Bug target/101796] New: " crazylht at gmail dot com
2021-08-06 3:23 ` [Bug target/101796] " crazylht at gmail dot com
2021-08-06 6:27 ` crazylht at gmail dot com
2021-08-27 7:26 ` pinskia at gcc dot gnu.org
2021-08-27 7:34 ` crazylht at gmail dot com [this message]
2021-12-15 8:27 ` cvs-commit at gcc dot gnu.org
2021-12-15 8:27 ` crazylht at gmail 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-101796-4-x4CnRkX5RT@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).