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 middle-end/110018] Missing vectorizable_conversion(unsigned char -> double) for BB vectorizer Date: Mon, 29 May 2023 06:14:46 +0000 [thread overview] Message-ID: <bug-110018-4-Nb4FTNCr7e@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-110018-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110018 --- Comment #3 from Hongtao.liu <crazylht at gmail dot com> --- Even we have direct optab for unsigned char to long long, BB vectorizer failer to optimize void foo1 (long long* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; a[4] = b[4]; a[5] = b[5]; a[6] = b[6]; a[7] = b[7]; } since we have vectype_out as V4DImode, but vectype_in as V8QImode as *vectype = SLP_TREE_VECTYPE (child); If manually change the testcase to void foo1 (long long* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; } Then BB vectorizer can do vectorization, but still failed for void foo1 (double* __restrict a, unsigned char* b) { a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; a[3] = b[3]; } So it looks there're 2 separate issue 1. As mentioned in the PR, we can use intermediate type for vectorizable unsigned char to double. 2. There's mismatch between vectype_out and vectype_in as SLP_TREE_VECTYPE (child);
next prev parent reply other threads:[~2023-05-29 6:14 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-05-29 2:35 [Bug middle-end/110018] New: " crazylht at gmail dot com 2023-05-29 3:28 ` [Bug middle-end/110018] " pinskia at gcc dot gnu.org 2023-05-29 5:53 ` crazylht at gmail dot com 2023-05-29 6:14 ` crazylht at gmail dot com [this message] 2023-05-30 7:57 ` rguenth at gcc dot gnu.org 2023-05-30 9:50 ` crazylht at gmail dot com 2023-06-21 2:33 ` cvs-commit at gcc dot gnu.org 2023-06-21 2:38 ` crazylht at gmail dot com 2023-06-21 14:35 ` cvs-commit at gcc dot gnu.org 2023-06-26 7:30 ` cvs-commit at gcc dot gnu.org 2023-06-26 7:49 ` cvs-commit 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-110018-4-Nb4FTNCr7e@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).