[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-05-16 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

H.J. Lu  changed:

   What|Removed |Added

   Target Milestone|--- |13.0
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #8 from H.J. Lu  ---
Fixed for GCC 13.

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-05-16 Thread gabravier at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #7 from Gabriel Ravier  ---
Can confirm it is indeed fixed

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-05-12 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #6 from Hongtao.liu  ---
Fixed in GCC13.

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-05-12 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #5 from CVS Commits  ---
The master branch has been updated by hongtao Liu :

https://gcc.gnu.org/g:8ab4b484153031c407b7d8c760b6a2605da1199a

commit r13-379-g8ab4b484153031c407b7d8c760b6a2605da1199a
Author: liuhongt 
Date:   Fri Apr 8 11:26:46 2022 +0800

Strip of a vector load which is only used partially.

Optimize

  _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>;
  _5 = BIT_FIELD_REF <_4, 128, 0>;

to

  _5 = BIT_FIELD_REF <_1, 128, 128>;

gcc/ChangeLog:

PR tree-optimization/102583
* tree-ssa-forwprop.cc (simplify_bitfield_ref): Extended to a
contiguous stride in the VEC_PERM_EXPR.

gcc/testsuite/ChangeLog:

* gcc.target/i386/pr102583.c: New test.
* gcc.target/i386/pr92645-2.c: Adjust testcase.
* gcc.target/i386/pr92645-3.c: Ditto.

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-04-08 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #4 from Hongtao.liu  ---
Created attachment 52771
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52771=edit
Pending patch for GCC13.

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-01-25 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #3 from Hongtao.liu  ---
(In reply to Hongtao.liu from comment #2)
> Simplify
>   _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>;
>   _5 = BIT_FIELD_REF <_4, 128, 0>;
> 
> to
> 
> _5 = BIT_FIELD_REF <_1, 128, 128>;
> 
> in match.pd?

maybe forwprop this
15  _1 = *srcp_7(D);
16  _2 = BIT_FIELD_REF <_1, 32, 128>;
17  _3 = BIT_FIELD_REF <_1, 32, 160>;
18  _4 = BIT_FIELD_REF <_1, 32, 192>;
19  _5 = BIT_FIELD_REF <_1, 32, 224>;
20  b_9 = {_2, _3, _4, _5};

directly into

b_9 = BIT_FIELD_REF <*srcp_7, 128, 128>;

[Bug tree-optimization/102583] [x86] Failure to optimize 32-byte integer vector conversion to 16-byte float vector properly when converting upper part with -mavx2

2022-01-24 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102583

--- Comment #2 from Hongtao.liu  ---
Simplify
  _4 = VEC_PERM_EXPR <_1, _1, { 4, 5, 6, 7, 4, 5, 6, 7 }>;
  _5 = BIT_FIELD_REF <_4, 128, 0>;

to

_5 = BIT_FIELD_REF <_1, 128, 128>;

in match.pd?