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

            Bug ID: 94398
           Summary: ICE: in vectorizable_load, at tree-vect-stmts.c:9173
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: z.zhanghaijian at huawei dot com
                CC: rguenther at suse dot de
  Target Milestone: ---

test case: gcc/testsuite/gcc.dg/pr94269.c

Command line: aarch64-linux-gnu-gcc -S -O2 -fopt-info -march=armv8.2-a+sve
-msve-vector-bits=256 -ftree-loop-vectorize -funsafe-math-optimizations
-mstrict-align pr94269.c

pr94269.c:16:9: optimized: loop vectorized using 32 byte vectors
during GIMPLE pass: vect
pr94269.c: In function 'foo':
pr94269.c:5:1: internal compiler error: in vectorizable_load, at
tree-vect-stmts.c:9173
    5 | foo(long n, float *x, int inc_x,
      | ^~~
0x162fcc7 vectorizable_load
        ../../gcc-git/gcc/tree-vect-stmts.c:9173
0x1635173 vect_transform_stmt(_stmt_vec_info*, gimple_stmt_iterator*,
_slp_tree*, _slp_instance*)
        ../../gcc-git/gcc/tree-vect-stmts.c:11034
0x165a33f vect_transform_loop_stmt
        ../../gcc-git/gcc/tree-vect-loop.c:8307
0x165b5c3 vect_transform_loop(_loop_vec_info*, gimple*)
        ../../gcc-git/gcc/tree-vect-loop.c:8708
0x1689f07 try_vectorize_loop_1
        ../../gcc-git/gcc/tree-vectorizer.c:990
0x168a183 try_vectorize_loop
        ../../gcc-git/gcc/tree-vectorizer.c:1047
0x168a32f vectorize_loops()
        ../../gcc-git/gcc/tree-vectorizer.c:1127
0x14e55e3 execute
        ../../gcc-git/gcc/tree-ssa-loop.c:414
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.

With -mstrict-align, aarch64_builtin_support_vector_misalignment will returns
false when misalignment factor is unknown at compile time.
Then vect_supportable_dr_alignment returns dr_unaligned_unsupported, which
triggers the ICE.

Reply via email to