[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #26 from Uroš Bizjak --- The testcase now compiles with -O2 -mf16c to: vpxor %xmm2, %xmm2, %xmm2 vpblendw$1, %xmm0, %xmm2, %xmm0 vpblendw$1, %xmm1, %xmm2, %xmm1 vcvtph2ps

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #25 from CVS Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:7eb961d83b0eda53aeb1cfaacdc367e1952de613 commit r12-5700-g7eb961d83b0eda53aeb1cfaacdc367e1952de613 Author: Uros Bizjak Date: Wed

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #24 from CVS Commits --- The master branch has been updated by Uros Bizjak : https://gcc.gnu.org/g:ca5667e867252db3c8642ee90f55427149cd92b6 commit r12-5584-gca5667e867252db3c8642ee90f55427149cd92b6 Author: Uros Bizjak Date: Mon

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #23 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:11d0a2af33910c6d243e7265fb7ea04d2bc89b25 commit r12-5574-g11d0a2af33910c6d243e7265fb7ea04d2bc89b25 Author: liuhongt Date: Mon

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-29 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #22 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:9519b694afbf9a35c36cf9f14d35d1c0e9e8cacc commit r12-5573-g9519b694afbf9a35c36cf9f14d35d1c0e9e8cacc Author: liuhongt Date: Fri

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-29 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #21 from Uroš Bizjak --- (In reply to Hongtao.liu from comment #20) > (In reply to Uroš Bizjak from comment #18) > > (In reply to Uroš Bizjak from comment #17) > > > (In reply to Hongtao.liu from comment #16) > > > > > > >

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-28 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #20 from Hongtao.liu --- (In reply to Uroš Bizjak from comment #18) > (In reply to Uroš Bizjak from comment #17) > > (In reply to Hongtao.liu from comment #16) > > > > > ix86_expand_vector_set is mainly used by vec_set_optab which

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-28 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #19 from Hongtao.liu --- (In reply to Uroš Bizjak from comment #17) > (In reply to Hongtao.liu from comment #16) > > > ix86_expand_vector_set is mainly used by vec_set_optab which exactly takes > > target as both input and output,

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #18 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #17) > (In reply to Hongtao.liu from comment #16) > > > ix86_expand_vector_set is mainly used by vec_set_optab which exactly takes > > target as both input and output,

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #17 from Uroš Bizjak --- (In reply to Hongtao.liu from comment #16) > ix86_expand_vector_set is mainly used by vec_set_optab which exactly takes > target as both input and output, it seems we can't create a new target for > that.

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #16 from Hongtao.liu --- (In reply to Uroš Bizjak from comment #15) > (In reply to Hongtao.liu from comment #14) > > (In reply to Uroš Bizjak from comment #13) > > > (In reply to Hongtao.liu from comment #12) > > > > > > > > > >

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #15 from Uroš Bizjak --- (In reply to Hongtao.liu from comment #14) > (In reply to Uroš Bizjak from comment #13) > > (In reply to Hongtao.liu from comment #12) > > > > > > > > Just noticed that for some reason two VPXORs are

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #14 from Hongtao.liu --- (In reply to Uroš Bizjak from comment #13) > (In reply to Hongtao.liu from comment #12) > > > > > > Just noticed that for some reason two VPXORs are emitted. One should be > > > enough for both VPINSRW

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #13 from Uroš Bizjak --- (In reply to Hongtao.liu from comment #12) > > > > Just noticed that for some reason two VPXORs are emitted. One should be > > enough for both VPINSRW insns. > > With new alternative in your attached

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #12 from Hongtao.liu --- > > Just noticed that for some reason two VPXORs are emitted. One should be > enough for both VPINSRW insns. With new alternative in your attached match(vpblenw one), RA could reuse zero register, w/o

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #11 from Hongtao.liu --- > The above dumps show inconsistendy for PEXTRW (it should be VPEXTRW) and > also open a question, why unpatched gcc prefers memory temp instead of GPR > temp for PEXTRW/PINSRW. > Because RA thought memory

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #10 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #7) > compiles with unpatched gcc -O2 -mf16c to: > > vmovss %xmm0, %xmm0, %xmm2 # 27[c=4 l=4] *movhf_internal/3 > pextrw $0, %xmm1, -4(%rsp)

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #9 from Hongtao.liu --- (In reply to Uroš Bizjak from comment #8) > diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md > index 68606e57e60..a2ebaa5ac63 100644 > --- a/gcc/config/i386/i386.md > +++

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #8 from Uroš Bizjak --- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 68606e57e60..a2ebaa5ac63 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -2528,12 +2528,12 @@ case TYPE_SSELOG:

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #7 from Uroš Bizjak --- The improvement with patch from comment #6: The testcase: _Float16 test (_Float16 a, _Float16 b) { return a + b; } compiles with unpatched gcc -O2 -mf16c to: vmovss %xmm0, %xmm0, %xmm2 # 27

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-26 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #6 from Uroš Bizjak --- Created attachment 51879 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51879=edit Improve HI/HFmode scalar insert The attached patch further improves HFmode -> SFmode conversion. HFmode values are

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Target Milestone|---

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #4 from Hongtao.liu --- Fixed in GCC12.

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #3 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:90cb088ece8d8cc1019d25629d1585e5b0234179 commit r12-5536-g90cb088ece8d8cc1019d25629d1585e5b0234179 Author: konglin1 Date: Wed Nov

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-10-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-10-18 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #2 from Uroš Bizjak --- (In reply to Uroš Bizjak from comment #1) > vxorps %xmm1, %xmm1, %xmm1 > vblendps %xmm1, %xmm1, %xmm0, $1 > vcvtps2ph %xmm0, %xmm1 vmovss %xmm1, %xmm1, %xmm0 instead of vblendps would also do the trick.

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-10-18 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #1 from Uroš Bizjak --- Something like (argument and result in %xmm0): vpxor %xmm1, %xmm1, %xmm1 vpblendw %xmm1, %xmm1, %xmm0, $1 vcvtph2ps %xmm0, %xmm1 instead of __extendhfsf2 and: vxorps %xmm1, %xmm1, %xmm1 vblendps %xmm1,