https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #21 from Hongtao.liu ---
(In reply to Hongtao.liu from comment #20)
> (In reply to Richard Biener from comment #19)
> > Ah, so the issue is missing -mavx512bw which means we end up with a AVX2
> > style
> > mask for V32QImode. With
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #22 from Hongtao.liu ---
(In reply to Hongtao.liu from comment #21)
> (In reply to Hongtao.liu from comment #20)
> > (In reply to Richard Biener from comment #19)
> > > Ah, so the issue is missing -mavx512bw which means we end up wit
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #23 from rguenther at suse dot de ---
On Tue, 18 Jan 2022, crazylht at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
>
> --- Comment #22 from Hongtao.liu ---
> (In reply to Hongtao.liu from comment #21
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
Andrew Pinski changed:
What|Removed |Added
CC||pinskia at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #25 from Hongtao.liu ---
in fold_unary_loc
---cut from fold-const.cc-
9276 else if (TREE_CODE (arg0) == COND_EXPR)
9277{
9278 tree arg01 = TREE_OPERAND (arg0, 1);
9279 tree arg02 = TREE_OPERAND
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #26 from Andrew Pinski ---
(In reply to Hongtao.liu from comment #25)
>
> gcc always tries to simplify (convert (cond (cmp a b) c d) > (cond (cmp
> a b) (convert c) (convert d)), exactly the opposite of what this case wants.
R
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #27 from Hongtao.liu ---
(In reply to Andrew Pinski from comment #26)
> (In reply to Hongtao.liu from comment #25)
> >
> > gcc always tries to simplify (convert (cond (cmp a b) c d) > (cond (cmp
> > a b) (convert c) (convert d)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #28 from Richard Biener ---
(In reply to Hongtao.liu from comment #25)
> in fold_unary_loc
> ---cut from fold-const.cc-
> 9276 else if (TREE_CODE (arg0) == COND_EXPR)
> 9277{
> 9278 tree arg01 = TREE_OPER
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #29 from Hongtao.liu ---
(In reply to Richard Biener from comment #28)
> (In reply to Hongtao.liu from comment #25)
> > in fold_unary_loc
> > ---cut from fold-const.cc-
> > 9276 else if (TREE_CODE (arg0) == COND_EXPR)
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #30 from rguenther at suse dot de ---
On Wed, 19 Jan 2022, crazylht at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
>
> --- Comment #29 from Hongtao.liu ---
> (In reply to Richard Biener from comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #31 from CVS Commits ---
The master branch has been updated by hongtao Liu :
https://gcc.gnu.org/g:8bc700f4c3fbe405413db02281ef2918bfa831fc
commit r12-6756-g8bc700f4c3fbe405413db02281ef2918bfa831fc
Author: liuhongt
Date: Mon Jan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #32 from Hongtao.liu ---
A patch is posted at
https://gcc.gnu.org/pipermail/gcc-patches/2022-January/589168.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
Andrew Pinski changed:
What|Removed |Added
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot
gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #34 from Jeffrey A. Law ---
I've always wanted to see us be able to push something like those matched
conversions down through the PHI.
That would make the code look like:
if (x.1_1 > 255)
goto ; [INV]
else
goto ; [INV]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #35 from Andrew Pinski ---
(In reply to Jeffrey A. Law from comment #34)
> I've always wanted to see us be able to push something like those matched
> conversions down through the PHI.
>
> Is that what you're working on?
Yes.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #36 from CVS Commits ---
The master branch has been updated by hongtao Liu :
https://gcc.gnu.org/g:7e204bd2f189850cb940677c99d8d93eb7dd40cd
commit r12-7216-g7e204bd2f189850cb940677c99d8d93eb7dd40cd
Author: liuhongt
Date: Mon Jan
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #37 from Richard Biener ---
Is this now "good enough" for GCC 12?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #38 from Hongtao.liu ---
(In reply to Richard Biener from comment #37)
> Is this now "good enough" for GCC 12?
Yes.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
Richard Biener changed:
What|Removed |Added
Priority|P3 |P2
Target Milestone|12.0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #40 from CVS Commits ---
The master branch has been updated by hongtao Liu :
https://gcc.gnu.org/g:754dce903ca28c4c2f2bc8614a8de5e631655f2e
commit r12-7276-g754dce903ca28c4c2f2bc8614a8de5e631655f2e
Author: liuhongt
Date: Wed Feb
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
Andrew Pinski changed:
What|Removed |Added
Summary|Missed vectorization under |[12 Regression] Missed
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #1 from Tamar Christina ---
Looks like the change causes the simpler conditional to be detected by the
vectorizer as a masked operation, which in principle makes sense:
note: vect_recog_mask_conversion_pattern: detected: iftmp.0_2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #2 from Hongtao.liu ---
(In reply to Tamar Christina from comment #1)
> Looks like the change causes the simpler conditional to be detected by the
> vectorizer as a masked operation, which in principle makes sense:
>
> note: vect_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #3 from Hongtao.liu ---
for patt_42 = () patt_40;
vectype_in (QImode:nunits 4)
unit-size
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fffea18ddc8 precision:1 min max >
QI size unit-si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #4 from Hongtao.liu ---
(In reply to Hongtao.liu from comment #3)
> for patt_42 = () patt_40;
>
> vectype_in (QImode:nunits 4)
>
> type size
> unit-size
> align:8 warn_if_not_align:0 symtab:0 alias
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #5 from Hongtao.liu ---
> And GCC vectorizer only handle 2X elements, but not 4X,8X,...
>
> /* For scalar masks we may have different boolean
>vector types having the same QImode. Thus we
>add additional chec
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
Richard Biener changed:
What|Removed |Added
Ever confirmed|0 |1
Last reconfirmed|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #7 from Richard Biener ---
Forcing the pattern to not trigger produces the expected
t.c:8:6: missed: not vectorized: relevant stmt not supported: iftmp.0_21 =
x.1_14 > 255 ? iftmp.0_19 : iftmp.0_20;
since condition vectorization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #8 from Hongtao.liu ---
(In reply to Richard Biener from comment #7)
> Forcing the pattern to not trigger produces the expected
>
> t.c:8:6: missed: not vectorized: relevant stmt not supported: iftmp.0_21 =
> x.1_14 > 255 ? iftmp.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #9 from rsandifo at gcc dot gnu.org
---
(In reply to Richard Biener from comment #7)
> I think that is what we need to add. We also don't have a good
> representation
> for "packing" of masks.
>
> diff --git a/gcc/tree-vect-patter
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #10 from Hongtao.liu ---
with
@@ -12120,7 +12120,8 @@ supportable_narrowing_operation (enum tree_code code,
c1 = VEC_PACK_TRUNC_EXPR;
if (VECTOR_BOOLEAN_TYPE_P (narrow_vectype)
&& VECTOR_BOOLEAN_TYPE_P (vectyp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #11 from Hongtao.liu ---
(In reply to Hongtao.liu from comment #10)
> with
> @@ -12120,7 +12120,8 @@ supportable_narrowing_operation (enum tree_code code,
>c1 = VEC_PACK_TRUNC_EXPR;
>if (VECTOR_BOOLEAN_TYPE_P (narrow_
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #12 from rguenther at suse dot de ---
On Thu, 13 Jan 2022, crazylht at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
>
> --- Comment #10 from Hongtao.liu ---
> with
> @@ -12120,7 +12120,8 @@ supportabl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #13 from rguenther at suse dot de ---
On Thu, 13 Jan 2022, rsandifo at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
>
> --- Comment #9 from rsandifo at gcc dot gnu.org
> ---
> (In reply to Richard
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #14 from Hongtao.liu ---
>
> But still not as good as before, since original version we only need to pack
> data which is produced by vec_cond_expr, but now need to extraly pack mask.
>
>
Also for non-avx512 target, it looks like
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #15 from Hongtao.liu ---
(In reply to rguent...@suse.de from comment #12)
> On Thu, 13 Jan 2022, crazylht at gmail dot com wrote:
>
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
> >
> > --- Comment #10 from Hongtao.liu -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #16 from rguenther at suse dot de ---
On Thu, 13 Jan 2022, crazylht at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
>
> --- Comment #15 from Hongtao.liu ---
> (In reply to rguent...@suse.de from comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #17 from Hongtao.liu ---
> As said, the scalar conversion does not make any sense...
Agree.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #18 from rsandifo at gcc dot gnu.org
---
Again haven't really looked at this in detail, so could be wrong, but:
(In reply to rguent...@suse.de from comment #13)
> On Thu, 13 Jan 2022, rsandifo at gcc dot gnu.org wrote:
>
> > https
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #19 from Richard Biener ---
Ah, so the issue is missing -mavx512bw which means we end up with a AVX2 style
mask for V32QImode. With -mavx512bw the code vectorizes fine.
I guess ix86_get_mask_mode is too restrictive here?
And indee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103771
--- Comment #20 from Hongtao.liu ---
(In reply to Richard Biener from comment #19)
> Ah, so the issue is missing -mavx512bw which means we end up with a AVX2
> style
> mask for V32QImode. With -mavx512bw the code vectorizes fine.
Vectorization
41 matches
Mail list logo