public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics
@ 2020-11-19 10:00 ktkachov at gcc dot gnu.org
  2020-11-19 10:00 ` [Bug tree-optimization/97904] " ktkachov at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-19 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97904
           Summary: ICE with AArch64 SVE intrinsics
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64

The testcase below ICEs for -march=armv8.2-a+sve

at -O0 the ICE is:
ice.c:19:1: internal compiler error: in tree_to_uhwi, at tree.c:7377
   19 | }
      | ^
0x136e268 tree_to_uhwi(tree_node const*)
        $SRC/gcc/tree.c:7377
0x13ed7b2 assemble_noswitch_variable
        $SRC/gcc/varasm.c:2104
0x13ed7b2 assemble_variable(tree_node*, int, int, int)
        $SRC/gcc/varasm.c:2321
0x13f0af1 varpool_node::assemble_decl()
        $SRC/gcc/varpool.c:587
0xb0a787 cgraph_order_sort::process()
        $SRC/gcc/cgraphunit.c:2548
0xb0b658 output_in_order
        $SRC/gcc/cgraphunit.c:2613
0xb0b658 symbol_table::compile()
        $SRC/gcc/cgraphunit.c:2831
0xb0de34 symbol_table::finalize_compilation_unit()
        $SRC/gcc/cgraphunit.c:3014
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

whereas at -O3 it is:
during GIMPLE pass: ccp
ice.c: In function ‘int main()’:
ice.c:19:1: internal compiler error: in maybe_canonicalize_mem_ref_addr, at
gimple-fold.c:4906
   19 | }
      | ^
0xcafec9 maybe_canonicalize_mem_ref_addr
        $SRC/gcc/gimple-fold.c:4906
0xcbaf32 fold_stmt_1
        $SRC/gcc/gimple-fold.c:4988
0xcc0a1d fold_stmt(gimple_stmt_iterator*, tree_node* (*)(tree_node*))
        $SRC/gcc/gimple-fold.c:5329
0x121a859 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
        $SRC/gcc/tree-ssa-propagate.c:1070
0x1a8d7d9 dom_walker::walk(basic_block_def*)
        $SRC/gcc/domwalk.c:309
0x121b938 substitute_and_fold_engine::substitute_and_fold(basic_block_def*)
        $SRC/gcc/tree-ssa-propagate.c:1199
0x1158927 ccp_finalize
        $SRC/gcc/tree-ssa-ccp.c:1022
0x1158ec8 do_ssa_ccp
        $SRC/gcc/tree-ssa-ccp.c:2586
0x1158ec8 execute
        $SRC/gcc/tree-ssa-ccp.c:2629
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


#include <arm_sve.h>
#include <array>

const std::array<svfloat32_t, 2> log_tab =
{
    {
        svdup_n_f32(-2.29561495781f),
        svdup_n_f32(-2.47071170807f),
    }
 };

int main(void)
{
    svbool_t pg;
    svfloat32_t x;
    auto A = svmla_f32_z(pg, log_tab[0], log_tab[1], x);

    return 0;
}

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
@ 2020-11-19 10:00 ` ktkachov at gcc dot gnu.org
  2020-11-19 13:06 ` acoplan at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-19 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.2.1, 11.0
   Target Milestone|---                         |10.3

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
  2020-11-19 10:00 ` [Bug tree-optimization/97904] " ktkachov at gcc dot gnu.org
@ 2020-11-19 13:06 ` acoplan at gcc dot gnu.org
  2020-11-19 13:25 ` acoplan at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-19 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-19
     Ever confirmed|0                           |1
                 CC|                            |acoplan at gcc dot gnu.org,
                   |                            |richard.sandiford at arm dot com
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Confirmed. Here is a simpler testcase for the -O0 ICE:

#include <arm_sve.h>
template <typename b, int c> struct d { b x[c]; };
d<svfloat32_t, 2> a;

Note that, without the template:

#include <arm_sve.h>
svfloat32_t a[2];

is just rejected:

test.cc:2:13: error: array elements cannot have SVE type 'svfloat32_t'
    2 | svfloat32_t a[2];
      |             ^

as is:

#include <arm_sve.h>
struct d {
  svfloat32_t a[2];
};

with the same error message.

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
  2020-11-19 10:00 ` [Bug tree-optimization/97904] " ktkachov at gcc dot gnu.org
  2020-11-19 13:06 ` acoplan at gcc dot gnu.org
@ 2020-11-19 13:25 ` acoplan at gcc dot gnu.org
  2020-11-19 13:42 ` acoplan at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-19 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Here is a simple testcase that hits both ICEs.

#include <arm_sve.h>
template <typename b, int c> struct a {
  b x[c];
  b &operator[](int i) { return x[i]; }
};
a<svfloat32_t, 2> x;
int main() {
  svbool_t l;
  svfloat32_t m = svmla_f32_z(l, x[0], x[1], m);
}

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-19 13:25 ` acoplan at gcc dot gnu.org
@ 2020-11-19 13:42 ` acoplan at gcc dot gnu.org
  2020-11-19 17:52 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-19 13:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
FWIW, clang (trunk) rejects that last testcase with:

<source>:3:6: error: array has sizeless element type '__SVFloat32_t'
  b x[c];
     ^
<source>:6:19: note: in instantiation of template class 'a<__SVFloat32_t, 2>'
requested here
a<svfloat32_t, 2> x;

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-19 13:42 ` acoplan at gcc dot gnu.org
@ 2020-11-19 17:52 ` rsandifo at gcc dot gnu.org
  2020-11-23  9:07 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-19 17:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|richard.sandiford at arm dot com   |rsandifo at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Hmm, could have sworn I'd added a test for this, but obviously
I didn't…

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-11-19 17:52 ` rsandifo at gcc dot gnu.org
@ 2020-11-23  9:07 ` cvs-commit at gcc dot gnu.org
  2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
  2020-12-02 18:42 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-23  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

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

commit r11-5243-gd3585f5d0df47ffa453f5fe436fdf588301e5314
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Mon Nov 23 09:06:59 2020 +0000

    c++: Add missing verify_type_context call [PR97904]

    When adding the verify_type_context target hook, I'd missed
    a site that needs to check an array element type.

    gcc/cp/
            PR c++/97904
            * pt.c (tsubst): Use verify_type_context to check the type
            of an array element.

    gcc/testsuite/
            PR c++/97904
            * g++.dg/ext/sve-sizeless-1.C: Add more template tests.
            * g++.dg/ext/sve-sizeless-2.C: Likewise.

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-11-23  9:07 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
  2020-12-02 18:42 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-02 16:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:20fc59de1e21aaddc9ae08bc9d7e060df6706579

commit r10-9110-g20fc59de1e21aaddc9ae08bc9d7e060df6706579
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Dec 2 16:20:36 2020 +0000

    c++: Add missing verify_type_context call [PR97904]

    When adding the verify_type_context target hook, I'd missed
    a site that needs to check an array element type.

    gcc/cp/
            PR c++/97904
            * pt.c (tsubst): Use verify_type_context to check the type
            of an array element.

    gcc/testsuite/
            PR c++/97904
            * g++.dg/ext/sve-sizeless-1.C: Add more template tests.
            * g++.dg/ext/sve-sizeless-2.C: Likewise.

    (cherry picked from commit d3585f5d0df47ffa453f5fe436fdf588301e5314)

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

* [Bug tree-optimization/97904] ICE with AArch64 SVE intrinsics
  2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
@ 2020-12-02 18:42 ` rsandifo at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-12-02 18:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on trunk and GCC 10 branch.

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

end of thread, other threads:[~2020-12-02 18:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 10:00 [Bug tree-optimization/97904] New: ICE with AArch64 SVE intrinsics ktkachov at gcc dot gnu.org
2020-11-19 10:00 ` [Bug tree-optimization/97904] " ktkachov at gcc dot gnu.org
2020-11-19 13:06 ` acoplan at gcc dot gnu.org
2020-11-19 13:25 ` acoplan at gcc dot gnu.org
2020-11-19 13:42 ` acoplan at gcc dot gnu.org
2020-11-19 17:52 ` rsandifo at gcc dot gnu.org
2020-11-23  9:07 ` cvs-commit at gcc dot gnu.org
2020-12-02 16:21 ` cvs-commit at gcc dot gnu.org
2020-12-02 18:42 ` rsandifo 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).