* [Bug c/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
@ 2012-04-11 14:12 ` ubizjak at gmail dot com
2012-04-11 14:16 ` ubizjak at gmail dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-11 14:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x32
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-11
CC| |kyukhin at gcc dot gnu.org
Target Milestone|--- |4.7.1
Ever Confirmed|0 |1
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-11 14:12:16 UTC ---
Confirmed, CC'd author.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
2012-04-11 14:12 ` [Bug c/52932] " ubizjak at gmail dot com
@ 2012-04-11 14:16 ` ubizjak at gmail dot com
2012-04-11 14:16 ` [Bug target/52932] " ubizjak at gmail dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-11 14:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot |ubizjak at gmail dot com
|gnu.org |
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-11 14:15:49 UTC ---
Created attachment 27133
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27133
Proposed patch
Kirill, can you please test proposed patch on AVX2 target?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
2012-04-11 14:12 ` [Bug c/52932] " ubizjak at gmail dot com
2012-04-11 14:16 ` ubizjak at gmail dot com
@ 2012-04-11 14:16 ` ubizjak at gmail dot com
2012-04-11 17:32 ` kirill.yukhin at intel dot com
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-11 14:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Component|c |target
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (2 preceding siblings ...)
2012-04-11 14:16 ` [Bug target/52932] " ubizjak at gmail dot com
@ 2012-04-11 17:32 ` kirill.yukhin at intel dot com
2012-04-12 13:53 ` kirill.yukhin at intel dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kirill.yukhin at intel dot com @ 2012-04-11 17:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Yukhin Kirill <kirill.yukhin at intel dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kirill.yukhin at intel dot
| |com
--- Comment #3 from Yukhin Kirill <kirill.yukhin at intel dot com> 2012-04-11 17:32:18 UTC ---
> Kirill, can you please test proposed patch on AVX2 target?
Sure, will do tomorrow morning!
K
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (3 preceding siblings ...)
2012-04-11 17:32 ` kirill.yukhin at intel dot com
@ 2012-04-12 13:53 ` kirill.yukhin at intel dot com
2012-04-12 13:54 ` kirill.yukhin at intel dot com
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kirill.yukhin at intel dot com @ 2012-04-12 13:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #5 from Yukhin Kirill <kirill.yukhin at intel dot com> 2012-04-12 13:52:26 UTC ---
(In reply to comment #2)
> Created attachment 27133 [details]
> Proposed patch
>
> Kirill, can you please test proposed patch on AVX2 target?
Uros, I've slightly updated your patch: idx and vector were intermixed.
Attached.
It passes AVX2 testing now
K
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (4 preceding siblings ...)
2012-04-12 13:53 ` kirill.yukhin at intel dot com
@ 2012-04-12 13:54 ` kirill.yukhin at intel dot com
2012-04-12 13:58 ` ubizjak at gmail dot com
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kirill.yukhin at intel dot com @ 2012-04-12 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #4 from Yukhin Kirill <kirill.yukhin at intel dot com> 2012-04-12 13:51:26 UTC ---
Created attachment 27140
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27140
Updated patch
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (5 preceding siblings ...)
2012-04-12 13:54 ` kirill.yukhin at intel dot com
@ 2012-04-12 13:58 ` ubizjak at gmail dot com
2012-04-12 17:08 ` ubizjak at gmail dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-12 13:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #6 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-12 13:56:39 UTC ---
(In reply to comment #5)
> > Kirill, can you please test proposed patch on AVX2 target?
>
> Uros, I've slightly updated your patch: idx and vector were intermixed.
> Attached.
> It passes AVX2 testing now
Thanks, I will commit the attached patch to mainline and 4.7 branches.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (6 preceding siblings ...)
2012-04-12 13:58 ` ubizjak at gmail dot com
@ 2012-04-12 17:08 ` ubizjak at gmail dot com
2012-04-12 17:11 ` ubizjak at gmail dot com
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-12 17:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-12 17:07:56 UTC ---
Created attachment 27144
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27144
Even more updated patch
Patch that also fixes vpermd insn.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (7 preceding siblings ...)
2012-04-12 17:08 ` ubizjak at gmail dot com
@ 2012-04-12 17:11 ` ubizjak at gmail dot com
2012-04-12 18:39 ` uros at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-12 17:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-12 17:10:31 UTC ---
(In reply to comment #5)
> Uros, I've slightly updated your patch: idx and vector were intermixed.
The same cure should be applied to vpermd insn. Fortunately, this allowed us to
vectorize vpermps and vpermd patterns.
Please also note that avx2-vpermd-2.c test also had switched operands to
_mm256_permutevar8x32_epi32.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (8 preceding siblings ...)
2012-04-12 17:11 ` ubizjak at gmail dot com
@ 2012-04-12 18:39 ` uros at gcc dot gnu.org
2012-04-13 16:51 ` agner at agner dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: uros at gcc dot gnu.org @ 2012-04-12 18:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #9 from uros at gcc dot gnu.org 2012-04-12 18:37:47 UTC ---
Author: uros
Date: Thu Apr 12 18:37:42 2012
New Revision: 186388
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186388
Log:
PR target/52932
* config/i386/avx2intrin.h (_mm256_permutevar8x32_ps): Change second
argument type to __m256i. Update call to __builtin_ia32_permvarsf256.
* config/i386/sse.md (UNSPEC_VPERMVAR): New.
(UNSPEC_VPERMSI, UNSPEC_VPERMSF): Remove.
(avx2_permvarv8sf, avx2_permvarv8si): Switch operands 1 and 2.
(avx2_permvar<mode>): Macroize insn from avx2_permvarv8sf and
avx2_permvarv8si using VI4F_256 mode iterator.
* config/i386/i386.c (bdesc_args) <__builtin_ia32_permvarsf256>:
Update builtin type to V8SF_FTYPE_V8SF_V8SI.
(ix86_expand_vec_perm): Update calls to gen_avx2_permvarv8si and
gen_avx2_permvarv8sf.
(expand_vec_perm_pshufb): Ditto.
testsuite/ChangeLog:
PR target/52932
* gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
second function argument.
* gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
(calc_permps): Update declaration. Calculate result correctly.
(avx2_test): Change src2 type to union256i_d.
* gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
correctly.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/avx2intrin.h
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/sse.md
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/avx2-vpermd-2.c
trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-1.c
trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-2.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (9 preceding siblings ...)
2012-04-12 18:39 ` uros at gcc dot gnu.org
@ 2012-04-13 16:51 ` agner at agner dot org
2012-04-13 16:58 ` ubizjak at gmail dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: agner at agner dot org @ 2012-04-13 16:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #10 from Agner Fog <agner at agner dot org> 2012-04-13 16:50:33 UTC ---
_mm256_permutevar8x32_epi32 has the operands in wrong order. They need
to be swapped. Did you fix this too?
On 12-04-2012 20:37, uros at gcc dot gnu.org wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
>
> --- Comment #9 from uros at gcc dot gnu.org 2012-04-12 18:37:47 UTC ---
> Author: uros
> Date: Thu Apr 12 18:37:42 2012
> New Revision: 186388
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186388
> Log:
> PR target/52932
> * config/i386/avx2intrin.h (_mm256_permutevar8x32_ps): Change second
> argument type to __m256i. Update call to __builtin_ia32_permvarsf256.
> * config/i386/sse.md (UNSPEC_VPERMVAR): New.
> (UNSPEC_VPERMSI, UNSPEC_VPERMSF): Remove.
> (avx2_permvarv8sf, avx2_permvarv8si): Switch operands 1 and 2.
> (avx2_permvar<mode>): Macroize insn from avx2_permvarv8sf and
> avx2_permvarv8si using VI4F_256 mode iterator.
> * config/i386/i386.c (bdesc_args)<__builtin_ia32_permvarsf256>:
> Update builtin type to V8SF_FTYPE_V8SF_V8SI.
> (ix86_expand_vec_perm): Update calls to gen_avx2_permvarv8si and
> gen_avx2_permvarv8sf.
> (expand_vec_perm_pshufb): Ditto.
>
> testsuite/ChangeLog:
>
> PR target/52932
> * gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
> second function argument.
> * gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
> (calc_permps): Update declaration. Calculate result correctly.
> (avx2_test): Change src2 type to union256i_d.
> * gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
> correctly.
>
>
> Modified:
> trunk/gcc/ChangeLog
> trunk/gcc/config/i386/avx2intrin.h
> trunk/gcc/config/i386/i386.c
> trunk/gcc/config/i386/sse.md
> trunk/gcc/testsuite/ChangeLog
> trunk/gcc/testsuite/gcc.target/i386/avx2-vpermd-2.c
> trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-1.c
> trunk/gcc/testsuite/gcc.target/i386/avx2-vpermps-2.c
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (10 preceding siblings ...)
2012-04-13 16:51 ` agner at agner dot org
@ 2012-04-13 16:58 ` ubizjak at gmail dot com
2012-04-13 18:10 ` ubizjak at gmail dot com
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-13 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #11 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-13 16:57:09 UTC ---
(In reply to comment #10)
> _mm256_permutevar8x32_epi32 has the operands in wrong order. They need
> to be swapped. Did you fix this too?
Yes.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (11 preceding siblings ...)
2012-04-13 16:58 ` ubizjak at gmail dot com
@ 2012-04-13 18:10 ` ubizjak at gmail dot com
2012-04-16 16:04 ` uros at gcc dot gnu.org
2012-04-16 16:05 ` ubizjak at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-13 18:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2012-04/msg00795.htm
| |l
--- Comment #12 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-13 18:09:51 UTC ---
Fixed on the trunk, needs backport to 4.7 branch.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (12 preceding siblings ...)
2012-04-13 18:10 ` ubizjak at gmail dot com
@ 2012-04-16 16:04 ` uros at gcc dot gnu.org
2012-04-16 16:05 ` ubizjak at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: uros at gcc dot gnu.org @ 2012-04-16 16:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
--- Comment #13 from uros at gcc dot gnu.org 2012-04-16 16:03:55 UTC ---
Author: uros
Date: Mon Apr 16 16:03:51 2012
New Revision: 186500
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186500
Log:
2012-04-16 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
2012-04-12 Uros Bizjak <ubizjak@gmail.com>
PR target/52932
* config/i386/avx2intrin.h (_mm256_permutevar8x32_ps): Change second
argument type to __m256i. Update call to __builtin_ia32_permvarsf256.
* config/i386/sse.md (avx2_permvarv8sf): Change operand 1 to V8SI.
(avx2_permvarv8sf, avx2_permvarv8si): Switch operands 1 and 2.
* config/i386/i386.c (bdesc_args) <__builtin_ia32_permvarsf256>:
Update builtin type to V8SF_FTYPE_V8SF_V8SI.
(ix86_expand_vec_perm): Update calls to gen_avx2_permvarv8si and
gen_avx2_permvarv8sf.
testsuite/ChangeLog:
2012-04-16 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
2012-04-12 Uros Bizjak <ubizjak@gmail.com>
PR target/52932
* gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
second function argument.
* gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
(calc_permps): Update declaration. Calculate result correctly.
(avx2_test): Change src2 type to union256i_d.
* gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
correctly.
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/config/i386/avx2intrin.h
branches/gcc-4_7-branch/gcc/config/i386/i386.c
branches/gcc-4_7-branch/gcc/config/i386/sse.md
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/avx2-vpermd-2.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/avx2-vpermps-1.c
branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/avx2-vpermps-2.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug target/52932] AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type
2012-04-11 10:25 [Bug c/52932] New: AVX2 intrinsic _mm256_permutevar8x32_ps has wrong parameter type agner at agner dot org
` (13 preceding siblings ...)
2012-04-16 16:04 ` uros at gcc dot gnu.org
@ 2012-04-16 16:05 ` ubizjak at gmail dot com
14 siblings, 0 replies; 16+ messages in thread
From: ubizjak at gmail dot com @ 2012-04-16 16:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52932
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #14 from Uros Bizjak <ubizjak at gmail dot com> 2012-04-16 16:05:00 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 16+ messages in thread