Fix ICE in tree-switch-conversion.
authorMartin Liska <mliska@suse.cz>
Mon, 21 Sep 2020 10:50:37 +0000 (12:50 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 21 Sep 2020 11:52:03 +0000 (13:52 +0200)
commitd726ecd9554a805d4a5e044cb21ca23a7f7ca49f
treed46e807c6d9a1889a586d0154ad0cd68d3972345
parent48b0c1250a5c7d72be6b3fbbb1117d1cce43daee
Fix ICE in tree-switch-conversion.

With SVE we can end up with:
switch (POLY_INT_CST [2, 2]) <default: <L2> [INV], case 2: <L3> [INV], case 4: <L3> [INV]>
which is fine to expand and we can remove the assert.

gcc/ChangeLog:

PR tree-optimization/96915
* tree-switch-conversion.c (switch_conversion::expand): Accept
also integer constants.

gcc/testsuite/ChangeLog:

PR tree-optimization/96915
* gcc.target/aarch64/sve/pr96915.c: New test.
gcc/testsuite/gcc.target/aarch64/sve/pr96915.c [new file with mode: 0644]
gcc/tree-switch-conversion.c