public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
@ 2011-12-03 11:19 Jeremie.Detrey at loria dot fr
  2011-12-03 11:21 ` [Bug target/51393] " Jeremie.Detrey at loria dot fr
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jeremie.Detrey at loria dot fr @ 2011-12-03 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51393
           Summary: Wrong parameter type for _mm256_insert_epi64 in
                    avxintrin.h
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Jeremie.Detrey@loria.fr


Created attachment 25978
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25978
Minimal example.

In avxintrin.h:762, the second parameter (__D) of the function
_mm256_insert_epi64 is declared as int where it should be long long.

This results in an uncorrect behavior (truncation to 32 bits then sign
extension) when the attached minimal program is compiled with options -O3
-mavx. A look at the corresponding assembler code confirms this:

  [...]
  vpxor   %xmm0, %xmm0, %xmm0
  movslq  %ebx, %rax
  vpinsrq $0, %rax, %xmm0, %xmm0
  [...]


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
@ 2011-12-03 11:21 ` Jeremie.Detrey at loria dot fr
  2011-12-03 16:56 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jeremie.Detrey at loria dot fr @ 2011-12-03 11:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jérémie Detrey <Jeremie.Detrey at loria dot fr> 2011-12-03 11:21:17 UTC ---
Created attachment 25979
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25979
Patch to fix the reported typo.

This simple patch should fix the typo in avxintrin.h.


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
  2011-12-03 11:21 ` [Bug target/51393] " Jeremie.Detrey at loria dot fr
@ 2011-12-03 16:56 ` jakub at gcc dot gnu.org
  2011-12-03 17:26 ` Jeremie.Detrey at loria dot fr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-03 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-03
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-03 16:56:23 UTC ---
The patch looks good, but patches should be sent to gcc-patches at gcc.gnu.org
mailing list, with a proper ChangeLog entry.  This one is short enough that it
doesn't need copyright assignment, can you please send it there?  Thanks.


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
  2011-12-03 11:21 ` [Bug target/51393] " Jeremie.Detrey at loria dot fr
  2011-12-03 16:56 ` jakub at gcc dot gnu.org
@ 2011-12-03 17:26 ` Jeremie.Detrey at loria dot fr
  2011-12-04 12:48 ` uros at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jeremie.Detrey at loria dot fr @ 2011-12-03 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jérémie Detrey <Jeremie.Detrey at loria dot fr> 2011-12-03 17:25:10 UTC ---
Done, thanks!


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (2 preceding siblings ...)
  2011-12-03 17:26 ` Jeremie.Detrey at loria dot fr
@ 2011-12-04 12:48 ` uros at gcc dot gnu.org
  2011-12-04 12:52 ` Jeremie.Detrey at loria dot fr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu.org @ 2011-12-04 12:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from uros at gcc dot gnu.org 2011-12-04 12:47:28 UTC ---
Author: uros
Date: Sun Dec  4 12:47:25 2011
New Revision: 181986

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181986
Log:
    PR target/51393
    * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
    parameter as long long.

testsuite/ChangeLog:

2011-12-04  Uros Bizjak  <ubizjak@gmail.com>
        Jérémie Detrey  <Jeremie.Detrey@loria.fr>

    PR target/51393
    * gcc.target/i386/pr51393.c: New test.


Added:
    trunk/gcc/testsuite/gcc.target/i386/pr51393.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/avxintrin.h
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (3 preceding siblings ...)
  2011-12-04 12:48 ` uros at gcc dot gnu.org
@ 2011-12-04 12:52 ` Jeremie.Detrey at loria dot fr
  2011-12-04 13:24 ` uros at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jeremie.Detrey at loria dot fr @ 2011-12-04 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

Jérémie Detrey <Jeremie.Detrey at loria dot fr> changed:

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

--- Comment #5 from Jérémie Detrey <Jeremie.Detrey at loria dot fr> 2011-12-04 12:51:53 UTC ---
Perfect, thank you very much!


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (4 preceding siblings ...)
  2011-12-04 12:52 ` Jeremie.Detrey at loria dot fr
@ 2011-12-04 13:24 ` uros at gcc dot gnu.org
  2011-12-04 13:39 ` uros at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu.org @ 2011-12-04 13:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from uros at gcc dot gnu.org 2011-12-04 13:23:52 UTC ---
Author: uros
Date: Sun Dec  4 13:23:48 2011
New Revision: 181988

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181988
Log:
    PR target/51393
    * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
    parameter as long long.

testsuite/ChangeLog:

    PR target/51393
    * gcc.target/i386/pr51393.c: New test.


Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.target/i386/pr51393.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/config/i386/avxintrin.h
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (5 preceding siblings ...)
  2011-12-04 13:24 ` uros at gcc dot gnu.org
@ 2011-12-04 13:39 ` uros at gcc dot gnu.org
  2011-12-04 13:43 ` ubizjak at gmail dot com
  2011-12-08 10:59 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: uros at gcc dot gnu.org @ 2011-12-04 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from uros at gcc dot gnu.org 2011-12-04 13:39:03 UTC ---
Author: uros
Date: Sun Dec  4 13:38:58 2011
New Revision: 181989

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181989
Log:
    PR target/51393
    * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
    parameter as long long.

testsuite/ChangeLog:

    PR target/51393
    * gcc.target/i386/pr51393.c: New test.


Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr51393.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/testsuite/ChangeLog


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (6 preceding siblings ...)
  2011-12-04 13:39 ` uros at gcc dot gnu.org
@ 2011-12-04 13:43 ` ubizjak at gmail dot com
  2011-12-08 10:59 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-04 13:43 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2011-12/msg00272.htm
                   |                            |l
   Target Milestone|---                         |4.5.4

--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-04 13:42:32 UTC ---
.


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

* [Bug target/51393] Wrong parameter type for _mm256_insert_epi64 in avxintrin.h
  2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
                   ` (7 preceding siblings ...)
  2011-12-04 13:43 ` ubizjak at gmail dot com
@ 2011-12-08 10:59 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-12-08 10:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-08 10:43:18 UTC ---
Author: jakub
Date: Thu Dec  8 10:43:13 2011
New Revision: 182106

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182106
Log:
    Backported from mainline
    2011-12-04  Jérémie Detrey  <Jeremie.Detrey@loria.fr>

    PR target/51393
    * config/i386/avxintrin.h (_mm256_insert_epi64): Declare second
    parameter as long long.

    2011-12-04  Uros Bizjak  <ubizjak@gmail.com>
            Jérémie Detrey  <Jeremie.Detrey@loria.fr>

    PR target/51393
    * gcc.target/i386/pr51393.c: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr51393.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/testsuite/ChangeLog


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

end of thread, other threads:[~2011-12-08 10:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-03 11:19 [Bug target/51393] New: Wrong parameter type for _mm256_insert_epi64 in avxintrin.h Jeremie.Detrey at loria dot fr
2011-12-03 11:21 ` [Bug target/51393] " Jeremie.Detrey at loria dot fr
2011-12-03 16:56 ` jakub at gcc dot gnu.org
2011-12-03 17:26 ` Jeremie.Detrey at loria dot fr
2011-12-04 12:48 ` uros at gcc dot gnu.org
2011-12-04 12:52 ` Jeremie.Detrey at loria dot fr
2011-12-04 13:24 ` uros at gcc dot gnu.org
2011-12-04 13:39 ` uros at gcc dot gnu.org
2011-12-04 13:43 ` ubizjak at gmail dot com
2011-12-08 10:59 ` jakub at gcc dot gnu.org

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