public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics
@ 2020-10-09  9:15 david.spickett at linaro dot org
  2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: david.spickett at linaro dot org @ 2020-10-09  9:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

            Bug ID: 97349
           Summary: Incorrect types for some Neon vdupq_n_<...> intrinsics
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: david.spickett at linaro dot org
  Target Milestone: ---

Created attachment 49337
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49337&action=edit
test C file

The attached file has function pointers with the expected types for these
intrinsics as shown in the ACLE. 

https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics?search=vdupq_n_

This fails to compile because some of the intrinsic types are incorrect.
(I haven't included all the vdupq_n_, just the ones that have issues)

$ ./aarch64-none-elf-gcc -v
Using built-in specs.
COLLECT_GCC=./aarch64-none-elf-gcc
COLLECT_LTO_WRAPPER=/arm/pdtl/builds/fsf-trunk.2226/installed/rhe6x86_64/aarch64-none-elf/bin/../libexec/gcc/aarch64-none-elf/11.0.0/lto-wrapper
Target: aarch64-none-elf
Configured with:
/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/src/gcc/configure
--target=aarch64-none-elf
--prefix=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/install//
--with-gmp=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-mpfr=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-mpc=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--with-isl=/tmp/dgboter/bbs/rhev-vm4--rhe6x86_64/buildbot/rhe6x86_64--aarch64-none-elf/build/build-aarch64-none-elf/host-tools
--disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=yes --enable-languages=c,c++,fortran --with-newlib
--with-pkgversion=fsf-trunk.2226
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200609 (experimental) (fsf-trunk.2226)

$ ./aarch64-none-elf-gcc /tmp/test.c -Wall -Wextra -c -o /dev/null
/tmp/test.c:3:32: warning: initialization of 'poly16x8_t (*)(poly16_t)' {aka
'poly16x8_t (*)(__Poly16_t)'} from incompatible pointer type 'poly16x8_t
(*)(uint32_t)' {aka 'poly16x8_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
    3 | poly16x8_t  (*fp0)(poly16_t) = vdupq_n_p16;
      |                                ^~~~~~~~~~~
/tmp/test.c:4:32: warning: initialization of 'poly64x2_t (*)(poly64_t)' {aka
'poly64x2_t (*)(__Poly64_t)'} from incompatible pointer type 'poly64x2_t
(*)(uint64_t)' {aka 'poly64x2_t (*)(long unsigned int)'}
[-Wincompatible-pointer-types]
    4 | poly64x2_t  (*fp1)(poly64_t) = vdupq_n_p64;
      |                                ^~~~~~~~~~~
/tmp/test.c:5:32: warning: initialization of 'poly8x16_t (*)(poly8_t)' {aka
'poly8x16_t (*)(__Poly8_t)'} from incompatible pointer type 'poly8x16_t
(*)(uint32_t)' {aka 'poly8x16_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
    5 | poly8x16_t  (*fp2)(poly8_t)  = vdupq_n_p8;
      |                                ^~~~~~~~~~
/tmp/test.c:6:32: warning: initialization of 'int16x8_t (*)(int16_t)' {aka
'int16x8_t (*)(short int)'} from incompatible pointer type 'int16x8_t
(*)(int32_t)' {aka 'int16x8_t (*)(int)'} [-Wincompatible-pointer-types]
    6 | int16x8_t   (*fp3)(int16_t)  = vdupq_n_s16;
      |                                ^~~~~~~~~~~
/tmp/test.c:7:32: warning: initialization of 'int8x16_t (*)(int8_t)' {aka
'int8x16_t (*)(signed char)'} from incompatible pointer type 'int8x16_t
(*)(int32_t)' {aka 'int8x16_t (*)(int)'} [-Wincompatible-pointer-types]
    7 | int8x16_t   (*fp4)(int8_t)   = vdupq_n_s8;
      |                                ^~~~~~~~~~
/tmp/test.c:8:32: warning: initialization of 'uint16x8_t (*)(uint16_t)' {aka
'uint16x8_t (*)(short unsigned int)'} from incompatible pointer type
'uint16x8_t (*)(uint32_t)' {aka 'uint16x8_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
    8 | uint16x8_t  (*fp5)(uint16_t) = vdupq_n_u16;
      |                                ^~~~~~~~~~~
/tmp/test.c:9:32: warning: initialization of 'uint8x16_t (*)(uint8_t)' {aka
'uint8x16_t (*)(unsigned char)'} from incompatible pointer type 'uint8x16_t
(*)(uint32_t)' {aka 'uint8x16_t (*)(unsigned int)'}
[-Wincompatible-pointer-types]
    9 | uint8x16_t  (*fp6)(uint8_t)  = vdupq_n_u8;
      |                                ^~~~~~~~~~

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

* [Bug target/97349] Incorrect types for some Arm Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
@ 2020-10-09  9:47 ` ktkachov at gcc dot gnu.org
  2020-10-09 16:31 ` [Bug target/97349] Incorrect types for some AArch64 " ktkachov at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-10-09  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-10-09
             Target|arm                         |aarch64
     Ever confirmed|0                           |1
   Target Milestone|---                         |8.5
      Known to fail|                            |10.2.1, 11.0, 8.4.1, 9.3.1
             Status|UNCONFIRMED                 |NEW
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed.

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
  2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
@ 2020-10-09 16:31 ` ktkachov at gcc dot gnu.org
  2020-10-10 15:11 ` ktkachov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-10-09 16:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
           Assignee|unassigned at gcc dot gnu.org      |ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Testing a patch.

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
  2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
  2020-10-09 16:31 ` [Bug target/97349] Incorrect types for some AArch64 " ktkachov at gcc dot gnu.org
@ 2020-10-10 15:11 ` ktkachov at gcc dot gnu.org
  2020-10-12 10:55 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-10-10 15:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

ktkachov at gcc dot gnu.org changed:

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

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
                   ` (2 preceding siblings ...)
  2020-10-10 15:11 ` ktkachov at gcc dot gnu.org
@ 2020-10-12 10:55 ` cvs-commit at gcc dot gnu.org
  2020-10-12 16:38 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-12 10:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kyrylo Tkachov <ktkachov@gcc.gnu.org>:

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

commit r11-3817-g8a3da2e6060ff0f61dae6aaada716e2c67f3d54f
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Oct 9 10:34:15 2020 +0100

    PR target/97349 AArch64: Incorrect types for some Neon vdupq_n_<...>
intrinsics

    This patch fixes the PR by adjusting the input types of the intrinsic
    prototypes to the ones mandated by ACLE
    Turns out the tests in the testsuite were already using the correct
    ones, but implicit conversions hid the bug...

    Bootstrapped and tested on aarch64-none-linux-gnu.

    gcc/
            PR target/97349
            * config/aarch64/arm_neon.h (vdupq_n_p8, vdupq_n_p16,
            vdupq_n_p64, vdupq_n_s8, vdupq_n_s16, vdupq_n_u8, vdupq_n_u16):
            Fix argument type.

    gcc/testsuite/
            PR target/97349
            * gcc.target/aarch64/simd/pr97349.c: New test.

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
                   ` (3 preceding siblings ...)
  2020-10-12 10:55 ` cvs-commit at gcc dot gnu.org
@ 2020-10-12 16:38 ` cvs-commit at gcc dot gnu.org
  2020-10-13 10:31 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-12 16:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Kyrylo Tkachov
<ktkachov@gcc.gnu.org>:

https://gcc.gnu.org/g:ce33401ac31248933a58b8b47c0ca3813b614381

commit r10-8882-gce33401ac31248933a58b8b47c0ca3813b614381
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Oct 9 10:34:15 2020 +0100

    PR target/97349 AArch64: Incorrect types for some Neon vdupq_n_<...>
intrinsics

    This patch fixes the PR by adjusting the input types of the intrinsic
    prototypes to the ones mandated by ACLE
    Turns out the tests in the testsuite were already using the correct
    ones, but implicit conversions hid the bug...

    Bootstrapped and tested on aarch64-none-linux-gnu.

    gcc/
            PR target/97349
            * config/aarch64/arm_neon.h (vdupq_n_p8, vdupq_n_p16,
            vdupq_n_p64, vdupq_n_s8, vdupq_n_s16, vdupq_n_u8, vdupq_n_u16):
            Fix argument type.

    gcc/testsuite/
            PR target/97349
            * gcc.target/aarch64/simd/pr97349.c: New test.

    (cherry picked from commit 8a3da2e6060ff0f61dae6aaada716e2c67f3d54f)

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
                   ` (4 preceding siblings ...)
  2020-10-12 16:38 ` cvs-commit at gcc dot gnu.org
@ 2020-10-13 10:31 ` cvs-commit at gcc dot gnu.org
  2020-10-13 11:27 ` cvs-commit at gcc dot gnu.org
  2020-10-13 11:28 ` ktkachov at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-13 10:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Kyrylo Tkachov
<ktkachov@gcc.gnu.org>:

https://gcc.gnu.org/g:b9c1ca3e2fc84b40dc2ab70d12064e3d0eb8abdd

commit r9-8992-gb9c1ca3e2fc84b40dc2ab70d12064e3d0eb8abdd
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Oct 9 10:34:15 2020 +0100

    PR target/97349 AArch64: Incorrect types for some Neon vdupq_n_<...>
intrinsics

    This patch fixes the PR by adjusting the input types of the intrinsic
    prototypes to the ones mandated by ACLE
    Turns out the tests in the testsuite were already using the correct
    ones, but implicit conversions hid the bug...

    Bootstrapped and tested on aarch64-none-linux-gnu.

    gcc/
            PR target/97349
            * config/aarch64/arm_neon.h (vdupq_n_p8, vdupq_n_p16,
            vdupq_n_p64, vdupq_n_s8, vdupq_n_s16, vdupq_n_u8, vdupq_n_u16):
            Fix argument type.

    gcc/testsuite/
            PR target/97349
            * gcc.target/aarch64/simd/pr97349.c: New test.

    (cherry picked from commit 8a3da2e6060ff0f61dae6aaada716e2c67f3d54f)

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
                   ` (5 preceding siblings ...)
  2020-10-13 10:31 ` cvs-commit at gcc dot gnu.org
@ 2020-10-13 11:27 ` cvs-commit at gcc dot gnu.org
  2020-10-13 11:28 ` ktkachov at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-13 11:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Kyrylo Tkachov
<ktkachov@gcc.gnu.org>:

https://gcc.gnu.org/g:5d3052a4755173f447cfcffa361086562033c8be

commit r8-10582-g5d3052a4755173f447cfcffa361086562033c8be
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Fri Oct 9 10:34:15 2020 +0100

    PR target/97349 AArch64: Incorrect types for some Neon vdupq_n_<...>
intrinsics

    This patch fixes the PR by adjusting the input types of the intrinsic
    prototypes to the ones mandated by ACLE
    Turns out the tests in the testsuite were already using the correct
    ones, but implicit conversions hid the bug...

    Bootstrapped and tested on aarch64-none-linux-gnu.

    gcc/
            PR target/97349
            * config/aarch64/arm_neon.h (vdupq_n_p8, vdupq_n_p16,
            vdupq_n_p64, vdupq_n_s8, vdupq_n_s16, vdupq_n_u8, vdupq_n_u16):
            Fix argument type.

    gcc/testsuite/
            PR target/97349
            * gcc.target/aarch64/simd/pr97349.c: New test.

    (cherry picked from commit 8a3da2e6060ff0f61dae6aaada716e2c67f3d54f)
    (cherry picked from commit b9c1ca3e2fc84b40dc2ab70d12064e3d0eb8abdd)

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

* [Bug target/97349] Incorrect types for some AArch64 Neon vdupq_n_<...> intrinsics
  2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
                   ` (6 preceding siblings ...)
  2020-10-13 11:27 ` cvs-commit at gcc dot gnu.org
@ 2020-10-13 11:28 ` ktkachov at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-10-13 11:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97349

ktkachov at gcc dot gnu.org changed:

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

--- Comment #7 from ktkachov at gcc dot gnu.org ---
Fixed on all active branches. Thanks for the report.

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

end of thread, other threads:[~2020-10-13 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09  9:15 [Bug target/97349] New: Incorrect types for some Neon vdupq_n_<...> intrinsics david.spickett at linaro dot org
2020-10-09  9:47 ` [Bug target/97349] Incorrect types for some Arm " ktkachov at gcc dot gnu.org
2020-10-09 16:31 ` [Bug target/97349] Incorrect types for some AArch64 " ktkachov at gcc dot gnu.org
2020-10-10 15:11 ` ktkachov at gcc dot gnu.org
2020-10-12 10:55 ` cvs-commit at gcc dot gnu.org
2020-10-12 16:38 ` cvs-commit at gcc dot gnu.org
2020-10-13 10:31 ` cvs-commit at gcc dot gnu.org
2020-10-13 11:27 ` cvs-commit at gcc dot gnu.org
2020-10-13 11:28 ` ktkachov 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).