public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only
@ 2020-08-05  7:36 qiaopeixin at huawei dot com
  2020-08-05  8:10 ` [Bug target/96479] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-08-05  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96479
           Summary: AArch64: return SIMD register with -mgeneral-regs-only
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qiaopeixin at huawei dot com
  Target Milestone: ---

Created attachment 49001
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49001&action=edit
aarch64: vector incompatible with -mgeneral-regs-only

Hi,

When compiling the test case of vector extraction and insertion with
-mgeneral-regs-only option, which is
gcc/testsuite/c-c++-common/torture/vector-subscript-2.c, GCC reports the ice,
which should not be. It uses the vector with the length of four integers, which
is defined in test case. The start funciton of expand pass will figure out the
mode of eventual return register to store the vector. At this time, GCC will
check if it can be returned in simd/fp register(s), and return v4si register.
Unfortunately, -mgeneral-regs-only prevent the use of simd/fp register(s).

I proposed to add one if statement when entering into the if statement of
checking that the mode of return register is simd/fp. If TARGET_FLOAT is false,
which is enabled by -mgeneral-regs-only option, it will report the error that
'-mgeneral-regs-only' is incompatiable with the use of vector types.

Is it the solution to solve the problem?

All the best

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
@ 2020-08-05  8:10 ` rguenth at gcc dot gnu.org
  2020-08-05  8:30 ` qiaopeixin at huawei dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-08-05  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Target|                            |aarch64

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
If -mgeneral-regs-only is not supposed to be an ABI changing option then the
compiler has to reject code using non-general regs.  With a diagnostic
preferably, not by ICEing.

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
  2020-08-05  8:10 ` [Bug target/96479] " rguenth at gcc dot gnu.org
@ 2020-08-05  8:30 ` qiaopeixin at huawei dot com
  2020-08-12 16:26 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-08-05  8:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from qiaopeixin at huawei dot com ---
(In reply to Richard Biener from comment #1)
> If -mgeneral-regs-only is not supposed to be an ABI changing option then the
> compiler has to reject code using non-general regs.  With a diagnostic
> preferably, not by ICEing.

For now, the compiler report the diagnostic information as following

../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c: In function
‘myfunc2’:
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c:17:1: error:
‘-mgeneral-regs-only’ is incompatible with the use of vector types
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c: In function
‘modify’:
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c:28:10: error:
‘-mgeneral-regs-only’ is incompatible with the use of vector types
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c:28:10: error:
‘-mgeneral-regs-only’ is incompatible with the use of vector types
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c: In function
‘myfunc2’:
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c:16:20: error:
‘-mgeneral-regs-only’ is incompatible with the use of vector types
../gcc/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c:23:12: error:
‘-mgeneral-regs-only’ is incompatible with the use of vector types

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
  2020-08-05  8:10 ` [Bug target/96479] " rguenth at gcc dot gnu.org
  2020-08-05  8:30 ` qiaopeixin at huawei dot com
@ 2020-08-12 16:26 ` rsandifo at gcc dot gnu.org
  2020-08-13 12:19 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-08-12 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |rsandifo at gcc dot gnu.org
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fix committed.

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
                   ` (2 preceding siblings ...)
  2020-08-12 16:26 ` rsandifo at gcc dot gnu.org
@ 2020-08-13 12:19 ` rsandifo at gcc dot gnu.org
  2020-08-20 12:11 ` rsandifo at gcc dot gnu.org
  2020-08-20 12:32 ` qiaopeixin at huawei dot com
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-08-13 12:19 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-08-13
             Status|RESOLVED                    |REOPENED
     Ever confirmed|0                           |1
         Resolution|FIXED                       |---

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Patch was reverted due to a glibc build failure.
See https://gcc.gnu.org/pipermail/gcc-patches/2020-August/551903.html

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
                   ` (3 preceding siblings ...)
  2020-08-13 12:19 ` rsandifo at gcc dot gnu.org
@ 2020-08-20 12:11 ` rsandifo at gcc dot gnu.org
  2020-08-20 12:32 ` qiaopeixin at huawei dot com
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-08-20 12:11 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

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

--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Now fixed.

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

* [Bug target/96479] AArch64: return SIMD register with -mgeneral-regs-only
  2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
                   ` (4 preceding siblings ...)
  2020-08-20 12:11 ` rsandifo at gcc dot gnu.org
@ 2020-08-20 12:32 ` qiaopeixin at huawei dot com
  5 siblings, 0 replies; 7+ messages in thread
From: qiaopeixin at huawei dot com @ 2020-08-20 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from qiaopeixin at huawei dot com ---
Fix on
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a5a635fc4331b6d5f1a1e688e1153abd2ff194a5

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

end of thread, other threads:[~2020-08-20 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05  7:36 [Bug target/96479] New: AArch64: return SIMD register with -mgeneral-regs-only qiaopeixin at huawei dot com
2020-08-05  8:10 ` [Bug target/96479] " rguenth at gcc dot gnu.org
2020-08-05  8:30 ` qiaopeixin at huawei dot com
2020-08-12 16:26 ` rsandifo at gcc dot gnu.org
2020-08-13 12:19 ` rsandifo at gcc dot gnu.org
2020-08-20 12:11 ` rsandifo at gcc dot gnu.org
2020-08-20 12:32 ` qiaopeixin at huawei 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).