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 tree-optimization/101668] BB vectorizer doesn't handle lowpart of existing vector Date: Thu, 29 Jul 2021 06:55:56 +0000 [thread overview] Message-ID: <bug-101668-4-xtOJD7y88r@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101668-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101668 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization Last reconfirmed| |2021-07-29 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 CC| |rguenth at gcc dot gnu.org Summary|vectorizer doesn't |BB vectorizer doesn't |categorize vector construct |handle lowpart of existing |cost right. |vector Blocks| |53947 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- The basic-block vectorizer is currently limited as to what "existing" vectors it recognizes. In this testcase we're accessing only the lowpart of 'src', something we cannot yet model in vectorizable_slp_permutation. The specific case isn't hard to fix, we'd get <bb 2> [local count: 1073741824]: _31 = VIEW_CONVERT_EXPR<vector(8) int>(src_18(D)); vect__2.4_33 = [vec_unpack_lo_expr] _31; vect__2.4_34 = [vec_unpack_hi_expr] _31; MEM <vector(4) long long int> [(long long int *)&tem] = vect__2.4_33; MEM <vector(4) long long int> [(long long int *)&tem + 32B] = vect__2.4_34; _17 = MEM[(v8di *)&tem]; *dst_28(D) = _17; tem ={v} {CLOBBER}; return; so we then fail to elide the temporary, producing bar_s32_s64: .LFB0: .cfi_startproc pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 vpmovsxdq %xmm0, %ymm1 vextracti128 $0x1, %ymm0, %xmm0 movq %rsp, %rbp .cfi_def_cfa_register 6 andq $-64, %rsp subq $8, %rsp vpmovsxdq %xmm0, %ymm0 vmovdqa %ymm1, -56(%rsp) vmovdqa %ymm0, -24(%rsp) vmovdqa64 -56(%rsp), %zmm2 vmovdqa64 %zmm2, (%rdi) leave .cfi_def_cfa 7, 8 ret it looks like there's no V8SI->V8DI conversion optab or we choose V4DI for some other reason as prefered vector mode. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 [Bug 53947] [meta-bug] vectorizer missed-optimizations
next prev parent reply other threads:[~2021-07-29 6:55 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-29 1:47 [Bug tree-optimization/101668] New: vectorizer doesn't categorize vector construct cost right crazylht at gmail dot com 2021-07-29 6:55 ` rguenth at gcc dot gnu.org [this message] 2021-07-29 7:03 ` [Bug tree-optimization/101668] BB vectorizer doesn't handle lowpart of existing vector crazylht at gmail dot com 2022-05-20 9:03 ` rguenth at gcc dot gnu.org 2022-05-20 9:13 ` crazylht at gmail dot com 2022-05-20 9:25 ` rguenth at gcc dot gnu.org 2022-05-25 13:05 ` rguenth at gcc dot gnu.org 2022-06-02 6:46 ` cvs-commit at gcc dot gnu.org 2022-06-02 6:47 ` rguenth 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-101668-4-xtOJD7y88r@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).