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; }