public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99647] New: arm: GCC generates invalid MVE vmov instruction
@ 2021-03-18 15:01 acoplan at gcc dot gnu.org
  2021-03-18 15:15 ` [Bug target/99647] " acoplan at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-18 15:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99647
           Summary: arm: GCC generates invalid MVE vmov instruction
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

We generate invalid assembly for the following testcase:

$ cat test.c
typedef int __attribute((vector_size(16))) V;
V f(void) {
  return (V){ (int)f, (int)f, (int)f, (int)f };
}
$ arm-eabi-gcc -c test.c -O2 -march=armv8.1-m.main+mve -mfloat-abi=hard
/tmp/ccSbIMAM.s: Assembler messages:
/tmp/ccSbIMAM.s:29: Error: expected <Rm> or <Dm> or <Qm> operand -- `vmov.32
q0,#f'

It looks like we're trying to use a label on the RHS of a vmov instruction:

f:
        @ args = 0, pretend = 0, frame = 0
        @ frame_needed = 0, uses_anonymous_args = 0
        @ link register save eliminated.
        vmov.32 q0, #f
        bx      lr

This can also be seen through autovec in the testsuite. In particular
gcc/testsuite/gcc.dg/torture/pr47958-1.c fails at -O3 in the same way:

$ arm-eabi-gcc -c gcc/testsuite/gcc.dg/torture/pr47958-1.c -c -O3
-march=armv8.1-m.main+mve -mfloat-abi=hard
/tmp/cc09hQWF.s: Assembler messages:
/tmp/cc09hQWF.s:42: Error: expected <Rm> or <Dm> or <Qm> operand -- `vmov.32
q3,#bar'

I noticed this while working on PR97252 which is a separate problem with MVE
vector moves.

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

end of thread, other threads:[~2021-04-26 21:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-18 15:01 [Bug target/99647] New: arm: GCC generates invalid MVE vmov instruction acoplan at gcc dot gnu.org
2021-03-18 15:15 ` [Bug target/99647] " acoplan at gcc dot gnu.org
2021-04-01 10:43 ` acoplan at gcc dot gnu.org
2021-04-08  8:37 ` cvs-commit at gcc dot gnu.org
2021-04-08  8:40 ` acoplan at gcc dot gnu.org
2021-04-26 21:11 ` cvs-commit at gcc dot gnu.org
2021-04-26 21:12 ` acoplan 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).