public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/82426] Missed tree-slp-vectorization on -O2 and -O3 Date: Wed, 25 Aug 2021 00:13:07 +0000 [thread overview] Message-ID: <bug-82426-4-n0pqcAx38r@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-82426-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82426 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Severity|normal |enhancement Last reconfirmed| |2021-08-25 --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Hmm, on aarch64 we do a decent job at vectorizing this (since GCC 11): ldp d4, d0, [x1] ldr d7, [x0, 16] ldp d6, d5, [x0] fmul v3.2s, v0.2s, v7.s[1] ldr d1, [x1, 16] fmul v2.2s, v0.2s, v6.s[1] fmul v0.2s, v0.2s, v5.s[1] fmla v3.2s, v4.2s, v7.s[0] fmla v2.2s, v4.2s, v6.s[0] fmla v0.2s, v4.2s, v5.s[0] fadd v1.2s, v1.2s, v3.2s stp d2, d0, [x8] str d1, [x8, 16] I suspect this is because V2SF does not exist on x86_64. Using -Dfloat=double seems to get better for x86_64 (with -mavx2): vmovupd (%rdx), %ymm0 vpermilpd $0, (%rsi), %ymm1 movq %rdi, %rax vmovsd 32(%rsi), %xmm5 vmovsd 40(%rsi), %xmm4 vpermpd $68, %ymm0, %ymm2 vpermpd $238, %ymm0, %ymm3 vmulpd %ymm2, %ymm1, %ymm2 vpermilpd $15, (%rsi), %ymm1 vmulpd %ymm3, %ymm1, %ymm1 vaddpd %ymm1, %ymm2, %ymm1 vmulsd %xmm5, %xmm0, %xmm2 vmovupd %ymm1, (%rdi) vmovapd %xmm0, %xmm1 vextractf128 $0x1, %ymm0, %xmm0 vmulsd %xmm4, %xmm0, %xmm3 vunpckhpd %xmm1, %xmm1, %xmm1 vunpckhpd %xmm0, %xmm0, %xmm0 vmulsd %xmm5, %xmm1, %xmm1 vmulsd %xmm4, %xmm0, %xmm0 vaddsd %xmm3, %xmm2, %xmm2 vaddsd 32(%rdx), %xmm2, %xmm2 vaddsd %xmm0, %xmm1, %xmm1 vaddsd 40(%rdx), %xmm1, %xmm1 vmovsd %xmm2, 32(%rdi) vmovsd %xmm1, 40(%rdi)
next parent reply other threads:[~2021-08-25 0:13 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-82426-4@http.gcc.gnu.org/bugzilla/> 2021-08-25 0:13 ` pinskia at gcc dot gnu.org [this message] 2021-08-25 7:13 ` rguenth at gcc dot gnu.org 2021-09-20 11:11 ` rguenth at gcc dot gnu.org 2021-09-27 8:24 ` cvs-commit at gcc dot gnu.org 2021-09-27 8:26 ` 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-82426-4-n0pqcAx38r@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).