https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94266
Bug ID: 94266 Summary: aarch64:ICE during GIMPLE pass: forwprop Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: qianchao9 at huawei dot com Target Milestone: --- Target: aarch64 hello I find an ICE when testing GCC10.0 on aarch64 with -march=armv8.2-a+sve -msve-vector-bits=256 -ftree-loop-vectorize -O2: Simple test case --- #include <stdarg.h> #define N 16 int out[N]; int a[2*N] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31}; /* Outer-loop vectorization. */ __attribute__ ((noinline)) void foo () { int i, j; int res; for (i = 0; i < N; i++) { res = 1000; for (j = 0; j < N; j++) res = res - a[i+j]; out[i] = res; } } int main () { foo (); return 0; } --- GCC version: gcc version 10.0.1 20200309 (experimental) (GCC) Runcommand: gcc new_test.c -march=armv8.2-a+sve -msve-vector-bits=256 -ftree-loop-vectorize -O2 -S -o new_test.s Result: during GIMPLE pass: forwprop pr_xxx.c: In function ‘foo’: pr_xxx.c:10:1: internal compiler error: in maybe_canonicalize_mem_ref_addr, at gimple-fold.c:4899 10 | foo () | ^~~ 0x97dd5b maybe_canonicalize_mem_ref_addr ../../gcc/gimple-fold.c:4899 0x988d97 fold_stmt_1 ../../gcc/gimple-fold.c:4972 0x98cfa3 fold_stmt_inplace(gimple_stmt_iterator*) ../../gcc/gimple-fold.c:5328 0xde455f forward_propagate_addr_expr_1 ../../gcc/tree-ssa-forwprop.c:878 0xde6513 forward_propagate_addr_expr ../../gcc/tree-ssa-forwprop.c:998 0xdea427 execute ../../gcc/tree-ssa-forwprop.c:2715