public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype
@ 2011-01-16 19:54 schnetter at gmail dot com
  2011-01-16 20:12 ` [Bug target/47318] " hjl.tools at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: schnetter at gmail dot com @ 2011-01-16 19:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

           Summary: _mm256_maskstore_pd has wrong prototype
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: schnetter@gmail.com


The AVX functions _mm256_maskstore_pd and _mm_maskstore_pd have the wrong
prototype in gcc 4.5.2 and gcc 4.6.0, as declared in avxintrin.h. According to
Intel (e.g.
<http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/cpp/mac/intref_cls/common/intref_avx_maskstore_pd.htm>),
the mask argument should have type __m256i, whereas gcc declares it as __m256d.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
@ 2011-01-16 20:12 ` hjl.tools at gmail dot com
  2011-01-16 22:02 ` hjl.tools at gmail dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-16 20:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.16 19:48:34
          Component|inline-asm                  |target
         AssignedTo|unassigned at gcc dot       |hjl.tools at gmail dot com
                   |gnu.org                     |
   Target Milestone|---                         |4.5.3
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
  2011-01-16 20:12 ` [Bug target/47318] " hjl.tools at gmail dot com
@ 2011-01-16 22:02 ` hjl.tools at gmail dot com
  2011-01-17 13:29 ` hjl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-16 22:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-01/msg01090.htm
                   |                            |l
   Target Milestone|4.5.3                       |4.4.6

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-16 21:06:01 UTC ---
A patch is posed at

http://gcc.gnu.org/ml/gcc-patches/2011-01/msg01090.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
  2011-01-16 20:12 ` [Bug target/47318] " hjl.tools at gmail dot com
  2011-01-16 22:02 ` hjl.tools at gmail dot com
@ 2011-01-17 13:29 ` hjl at gcc dot gnu.org
  2011-01-17 13:46 ` hjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-17 13:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

--- Comment #2 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-17 12:47:23 UTC ---
Author: hjl
Date: Mon Jan 17 12:47:21 2011
New Revision: 168899

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168899
Log:
Correct mask operand for AVX mask load/store.

gcc/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * config/i386/avxintrin.h (_mm_maskload_pd): Change mask to
    __m128i.
    (_mm_maskstore_pd): Likewise.
    (_mm_maskload_ps): Likewise.
    (_mm_maskstore_ps): Likewise.
    (_mm256_maskload_pd): Change mask to __m256i.
    (_mm256_maskstore_pd): Likewise.
    (_mm256_maskload_ps): Likewise.
    (_mm256_maskstore_ps): Likewise.

    * config/i386/i386-builtin-types.def: Updated.
    (ix86_expand_special_args_builtin): Likewise.

    * config/i386/i386.c (bdesc_special_args): Update
    __builtin_ia32_maskloadpd, __builtin_ia32_maskloadps,
    __builtin_ia32_maskloadpd256, __builtin_ia32_maskloadps256,
    __builtin_ia32_maskstorepd, __builtin_ia32_maskstoreps,
    __builtin_ia32_maskstorepd256 and __builtin_ia32_maskstoreps256.

    * config/i386/sse.md (avx_maskload<ssemodesuffix><avxmodesuffix>):
    Use <avxpermvecmode> on mask register.
    (avx_maskstore<ssemodesuffix><avxmodesuffix>): Likewise.

gcc/testsuite/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * gcc.target/i386/avx-vmaskmovpd-1.c: New.
    * gcc.target/i386/avx-vmaskmovpd-2.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.

    * gcc.target/i386/avx-vmaskmovpd-256-1.c (avx_test): Load mask
    as __m256i.
    * gcc.target/i386/avx-vmaskmovpd-256-2.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-1.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-2.c (avx_test): Likewise.

Added:
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/avxintrin.h
    trunk/gcc/config/i386/i386-builtin-types.def
    trunk/gcc/config/i386/i386.c
    trunk/gcc/config/i386/sse.md
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c
    trunk/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
                   ` (2 preceding siblings ...)
  2011-01-17 13:29 ` hjl at gcc dot gnu.org
@ 2011-01-17 13:46 ` hjl at gcc dot gnu.org
  2011-01-17 14:19 ` hjl at gcc dot gnu.org
  2011-01-18 18:43 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-17 13:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

--- Comment #3 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-17 13:10:22 UTC ---
Author: hjl
Date: Mon Jan 17 13:10:18 2011
New Revision: 168900

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168900
Log:
Correct mask operand for AVX mask load/store.

gcc/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    Backport from mainline
    2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * config/i386/avxintrin.h (_mm_maskload_pd): Change mask to
    __m128i.
    (_mm_maskstore_pd): Likewise.
    (_mm_maskload_ps): Likewise.
    (_mm_maskstore_ps): Likewise.
    (_mm256_maskload_pd): Change mask to __m256i.
    (_mm256_maskstore_pd): Likewise.
    (_mm256_maskload_ps): Likewise.
    (_mm256_maskstore_ps): Likewise.

    * config/i386/i386-builtin-types.def: Updated.
    (ix86_expand_special_args_builtin): Likewise.

    * config/i386/i386.c (bdesc_special_args): Update
    __builtin_ia32_maskloadpd, __builtin_ia32_maskloadps,
    __builtin_ia32_maskloadpd256, __builtin_ia32_maskloadps256,
    __builtin_ia32_maskstorepd, __builtin_ia32_maskstoreps,
    __builtin_ia32_maskstorepd256 and __builtin_ia32_maskstoreps256.

    * config/i386/sse.md (avx_maskload<ssemodesuffix><avxmodesuffix>):
    Use <avxpermvecmode> on mask register.
    (avx_maskstore<ssemodesuffix><avxmodesuffix>): Likewise.

gcc/testsuite/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    Backport from mainline
    2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * gcc.target/i386/avx-vmaskmovpd-1.c: New.
    * gcc.target/i386/avx-vmaskmovpd-2.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.

    * gcc.target/i386/avx-vmaskmovpd-256-1.c (avx_test): Load mask
    as __m256i.
    * gcc.target/i386/avx-vmaskmovpd-256-2.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-1.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-2.c (avx_test): Likewise.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/config/i386/avxintrin.h
    branches/gcc-4_5-branch/gcc/config/i386/i386-builtin-types.def
    branches/gcc-4_5-branch/gcc/config/i386/i386.c
    branches/gcc-4_5-branch/gcc/config/i386/sse.md
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c
   
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c
   
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c
   
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
                   ` (3 preceding siblings ...)
  2011-01-17 13:46 ` hjl at gcc dot gnu.org
@ 2011-01-17 14:19 ` hjl at gcc dot gnu.org
  2011-01-18 18:43 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hjl at gcc dot gnu.org @ 2011-01-17 14:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

--- Comment #4 from hjl at gcc dot gnu.org <hjl at gcc dot gnu.org> 2011-01-17 13:54:46 UTC ---
Author: hjl
Date: Mon Jan 17 13:54:43 2011
New Revision: 168904

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168904
Log:
Correct mask operand for AVX mask load/store.

gcc/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    Backport from mainline
    2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * config/i386/avxintrin.h (_mm_maskload_pd): Change mask to
    __m128i.
    (_mm_maskstore_pd): Likewise.
    (_mm_maskload_ps): Likewise.
    (_mm_maskstore_ps): Likewise.
    (_mm256_maskload_pd): Change mask to __m256i.
    (_mm256_maskstore_pd): Likewise.
    (_mm256_maskload_ps): Likewise.
    (_mm256_maskstore_ps): Likewise.

    * config/i386/i386-builtin-types.def: Updated.
    (ix86_expand_special_args_builtin): Likewise.

    * config/i386/i386.c (ix86_special_builtin_type): Remove
    V8SF_FTYPE_PCV8SF_V8SF, V4DF_FTYPE_PCV4DF_V4DF,
    V4SF_FTYPE_PCV4SF_V4SF, V2DF_FTYPE_PCV2DF_V2DF,
    VOID_FTYPE_PV8SF_V8SF_V8SF, VOID_FTYPE_PV4DF_V4DF_V4DF,
    VOID_FTYPE_PV4SF_V4SF_V4SF and VOID_FTYPE_PV2DF_V2DF_V2DF.
    Add V8SF_FTYPE_PCV8SF_V8SI, V4DF_FTYPE_PCV4DF_V4DI,
    V4SF_FTYPE_PCV4SF_V4SI, V2DF_FTYPE_PCV2DF_V2DI,
    VOID_FTYPE_PV8SF_V8SI_V8SF, VOID_FTYPE_PV4DF_V4DI_V4DF,
    VOID_FTYPE_PV4SF_V4SI_V4SF and VOID_FTYPE_PV2DF_V2DI_V2DF.
    (bdesc_special_args): Update
    __builtin_ia32_maskloadpd, __builtin_ia32_maskloadps,
    __builtin_ia32_maskloadpd256, __builtin_ia32_maskloadps256,
    __builtin_ia32_maskstorepd, __builtin_ia32_maskstoreps,
    __builtin_ia32_maskstorepd256 and __builtin_ia32_maskstoreps256.
    (ix86_init_mmx_sse_builtins): Updated.

    * config/i386/sse.md (avx_maskload<ssemodesuffix><avxmodesuffix>):
    Use <avxpermvecmode> on mask register.
    (avx_maskstore<ssemodesuffix><avxmodesuffix>): Likewise.

gcc/testsuite/

2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    Backport from mainline
    2011-01-17  H.J. Lu  <hongjiu.lu@intel.com>

    PR target/47318
    * gcc.target/i386/avx-vmaskmovpd-1.c: New.
    * gcc.target/i386/avx-vmaskmovpd-2.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.
    * gcc.target/i386/avx-vmaskmovps-1.c: Likewise.

    * gcc.target/i386/avx-vmaskmovpd-256-1.c (avx_test): Load mask
    as __m256i.
    * gcc.target/i386/avx-vmaskmovpd-256-2.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-1.c (avx_test): Likewise.
    * gcc.target/i386/avx-vmaskmovps-256-2.c (avx_test): Likewise.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-2.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-2.c
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/config/i386/avxintrin.h
    branches/gcc-4_4-branch/gcc/config/i386/i386.c
    branches/gcc-4_4-branch/gcc/config/i386/sse.md
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
   
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-1.c
   
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovpd-256-2.c
   
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-1.c
   
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/avx-vmaskmovps-256-2.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug target/47318] _mm256_maskstore_pd has wrong prototype
  2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
                   ` (4 preceding siblings ...)
  2011-01-17 14:19 ` hjl at gcc dot gnu.org
@ 2011-01-18 18:43 ` hjl.tools at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-18 18:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47318

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-18 18:00:08 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-18 18:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-16 19:54 [Bug inline-asm/47318] New: _mm256_maskstore_pd has wrong prototype schnetter at gmail dot com
2011-01-16 20:12 ` [Bug target/47318] " hjl.tools at gmail dot com
2011-01-16 22:02 ` hjl.tools at gmail dot com
2011-01-17 13:29 ` hjl at gcc dot gnu.org
2011-01-17 13:46 ` hjl at gcc dot gnu.org
2011-01-17 14:19 ` hjl at gcc dot gnu.org
2011-01-18 18:43 ` hjl.tools at gmail dot com

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).