[Bug target/94959] New: Wrong code gen for MVE intrinsics vldrbq_s32 which fails with assembler `Error: lo register required`
sripar01 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 5 17:04:56 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94959
Bug ID: 94959
Summary: Wrong code gen for MVE intrinsics vldrbq_s32 which
fails with assembler `Error: lo register required`
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sripar01 at gcc dot gnu.org
Target Milestone: ---
Created attachment 48457
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48457&action=edit
test case
$ arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/media/sripar01/2tb_work/Release/build-arm-none-eabi/install/libexec/gcc/arm-none-eabi/10.0.1/lto-wrapper
Target: arm-none-eabi
Configured with: /media/sripar01/2tb_work/Release/src/gcc/configure
--target=arm-none-eabi
--prefix=/media/sripar01/2tb_work/Release/build-arm-none-eabi/install//
--with-gmp=/media/sripar01/2tb_work/Release/build-arm-none-eabi/host-tools
--with-mpfr=/media/sripar01/2tb_work/Release/build-arm-none-eabi/host-tools
--with-mpc=/media/sripar01/2tb_work/Release/build-arm-none-eabi/host-tools
--with-isl=/media/sripar01/2tb_work/Release/build-arm-none-eabi/host-tools
--disable-shared --disable-nls --disable-threads --disable-tls
--enable-checking=yes --enable-languages=c,c++,fortran --with-newlib
--with-multilib-list=rmprofile --with-pkgversion=unknown
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 10.0.1 20200427 (experimental) (unknown)
$arm-none-eabi-gcc new.c -c -Ofast -march=armv8.1-m.main+mve -mfloat-abi=hard
new.c: In function 'foo':
new.c:12351:27: warning: passing argument 1 of '__arm_vldrbq_s32' makes pointer
from integer without a cast [-Wint-conversion]
12351 | b += __arm_vldrbq_s32(c1);
| ^~
| |
| char
new.c:8600:34: note: expected 'const int8_t *' {aka 'const signed char *'} but
argument is of type 'char'
8600 | __arm_vldrbq_s32 (int8_t const * __base)
| ~~~~~~~~~~~~~~~^~~~~~
/tmp/cc3Q97vs.s: Assembler messages:
/tmp/cc3Q97vs.s:47: Error: lo register required -- `vldrb.s32 q2,[ip]'
`vldrb.s32 q2,[ip]' --> For vldrbq_s32 MVE intrinsic, only low registers are
allowed as second argument and but current compiler is generating wrong code,
which is failing with assembler as shown above.
The test case added is not a properly written one (char variable c passed to
vldrbq_s32 where as expected is const int8_t *) but this is done to reproduce
the above failure.
More information about the Gcc-bugs
mailing list