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/113552] [11/12/13/14 Regression] vectorizer generates calls to vector math routines with 1 simd lane. Date: Tue, 23 Jan 2024 10:56:38 +0000 [thread overview] Message-ID: <bug-113552-4-GDtVgveMgT@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-113552-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113552 --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- OK, maybe the costing is simply not taking into account that we chose the simdlen == 1 variant which _does_ exist! It's the chosen one: 4052 bestn = cgraph_node::get (simd_clone_info[0]); (gdb) p bestn $5 = <cgraph_node * 0x7ffff695e440 "cos.simdclone.0"/2> (gdb) p bestn->simdclone->simdlen $6 = {coeffs = {1, 0}} and it's usable 4077 int target_badness = targetm.simd_clone.usable (n); 4078 if (target_badness < 0) (returns 0) But note we do 4073 if (num_calls != 1) 4074 this_badness += exact_log2 (num_calls) * 4096; which of course is quite bogus since we have 12 calls and exact_log2 will return -1 here. Maybe we want ceil_log2 here. when we try the simdlen == 2 variant that also turns out usable but the calculates badness is the same so we stick to the simdlen == 1 one. So - the target should reject this clone or not generate it in the first place. And of course the cost thing should be fixed which will likely mask the issue in the target.
next prev parent reply other threads:[~2024-01-23 10:56 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-01-23 7:53 [Bug middle-end/113552] New: " tnfchris at gcc dot gnu.org 2024-01-23 7:53 ` [Bug tree-optimization/113552] " tnfchris at gcc dot gnu.org 2024-01-23 8:13 ` rguenth at gcc dot gnu.org 2024-01-23 8:51 ` nsz at gcc dot gnu.org 2024-01-23 8:51 ` tnfchris at gcc dot gnu.org 2024-01-23 8:54 ` tnfchris at gcc dot gnu.org 2024-01-23 10:12 ` tnfchris at gcc dot gnu.org 2024-01-23 10:39 ` rguenth at gcc dot gnu.org 2024-01-23 10:56 ` rguenth at gcc dot gnu.org [this message] 2024-01-23 10:59 ` rguenth at gcc dot gnu.org 2024-01-23 11:19 ` tnfchris at gcc dot gnu.org 2024-01-23 11:57 ` rguenth at gcc dot gnu.org 2024-01-23 13:10 ` cvs-commit at gcc dot gnu.org 2024-01-24 15:58 ` cvs-commit at gcc dot gnu.org 2024-04-15 11:14 ` [Bug tree-optimization/113552] [11/12/13 " cvs-commit at gcc dot gnu.org 2024-04-15 11:38 ` cvs-commit at gcc dot gnu.org 2024-04-15 11:40 ` tnfchris 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-113552-4-GDtVgveMgT@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).