https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99813
Bug ID: 99813 Summary: SVE: Invalid assembly at -O3 (multiplier out of range in incb instruction) Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- The following fails: $ cat test.cc long a, b; bool c[2][14][2][16], f[2][14][2][16]; bool d; char e[2][4][2][6]; void g() { a = 0; for (int h = 0; h < 2; ++h) for (int i = 0; i < 14; ++i) for (int j = 0; j < 2; ++j) for (int k = 0; k < 16; ++k) c[h][i][j][k] = 0; d = 0; for (int h; h < 2; ++h) for (int i = 0; i < 4; ++i) for (int j = 0; j < 2; ++j) for (int k = 0; k < 6; ++k) e[h][i][j][k] = 6; for (int h = 0; h < 2; ++h) for (int i = 0; i < 14; ++i) for (int j = 0; j < 2; ++j) for (int k = 0; k < 16; ++k) f[h][i][j][k] = b = 9; } $ aarch64-linux-gnu-gcc -c test.cc -O3 -march=armv8.2-a+sve -fvect-cost-model=unlimited -fno-tree-dominator-opts -mtune=cortex-a72 /tmp/ccXhdoed.s: Assembler messages: /tmp/ccXhdoed.s:647: Error: multiplier out of range 1 to 16 at operand 2 -- `incb x15,all,mul#28' The choice of -mtune is questionable given that we've asked for SVE, but we shouldn't generate invalid assembly in any case.