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/107096] New: Fully masking vectorization with AVX512 ICEs gcc.dg/vect/vect-over-widen-*.c Date: Fri, 30 Sep 2022 11:41:48 +0000 [thread overview] Message-ID: <bug-107096-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107096 Bug ID: 107096 Summary: Fully masking vectorization with AVX512 ICEs gcc.dg/vect/vect-over-widen-*.c Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- With like /home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c:11:1: error: conversion of register to a different size in 'view_convert_expr' VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_11); _164 = VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_11); /home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c:11:1: error: conversion of register to a different size in 'view_convert_expr' VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_8); _167 = VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_8); /home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c:11:1: error: conversion of register to a different size in 'view_convert_expr' VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_118); _170 = VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_118); /home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c:11:1: error: conversion of register to a different size in 'view_convert_expr' VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_119); _173 = VIEW_CONVERT_EXPR<vector(8) <signed-boolean:1>>(loop_mask_119); during GIMPLE pass: vect dump file: ./vect-over-widen-2.c.172t.vect /home/rguenther/src/trunk/gcc/testsuite/gcc.dg/vect/vect-over-widen-2.c:11:1: internal compiler error: verify_gimple failed The issue is that in vect_get_loop_mask we do if (maybe_ne (TYPE_VECTOR_SUBPARTS (mask_type), TYPE_VECTOR_SUBPARTS (vectype))) { /* A loop mask for data type X can be reused for data type Y if X has N times more elements than Y and if Y's elements are N times bigger than X's. In this case each sequence of N elements in the loop mask will be all-zero or all-one. We can then view-convert the mask so that each sequence of N elements is replaced by a single element. */ gcc_assert (multiple_p (TYPE_VECTOR_SUBPARTS (mask_type), TYPE_VECTOR_SUBPARTS (vectype))); gimple_seq seq = NULL; mask_type = truth_type_for (vectype); mask = gimple_build (&seq, VIEW_CONVERT_EXPR, mask_type, mask); but that ends up VIEW_CONVERTing vector(16) <signed-boolean:1> to vector(8) <signed-boolean:1>, in this case a HImode mask to a QImode mask. If I understand the comment correctly then it wants to re-use a mask for V16QI for V8HI indicating that the mask bits should be set in pairs for the V16QImask. But then I don't understand how VIEW_CONVERTing should perform the desired conversion. It might be OK if the mask is a byte mask (like for classic AVX2) but for AVX512 it would require unpacking even/odd bits. The actual error is likely in the setup of the loop masks though, thinking we could do this re-use.
next reply other threads:[~2022-09-30 11:41 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-09-30 11:41 rguenth at gcc dot gnu.org [this message] 2022-09-30 12:30 ` [Bug tree-optimization/107096] " rguenth at gcc dot gnu.org 2022-09-30 13:07 ` rsandifo at gcc dot gnu.org 2022-10-10 9:49 ` rguenth at gcc dot gnu.org 2022-10-10 11:01 ` ams at gcc dot gnu.org 2022-10-10 11:33 ` rguenth at gcc dot gnu.org 2022-10-10 12:38 ` rsandifo at gcc dot gnu.org 2022-10-10 12:55 ` rguenther at suse dot de 2022-10-10 14:20 ` rsandifo at gcc dot gnu.org 2022-10-11 12:43 ` rguenth at gcc dot gnu.org 2023-02-15 7:08 ` crazylht at gmail dot com 2023-02-15 7:09 ` crazylht at gmail dot com 2023-02-15 7:26 ` rguenther at suse dot de 2023-02-16 2:09 ` crazylht at gmail dot com 2023-06-14 12:55 ` 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-107096-4@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).