This backport contains 1 patch from gcc main stream tree. The commit id of these patchs list as following in the order of time. 0001-re-PR-tree-optimization-92085-ICE-tree-check-expecte.patch 3c8e341b996546607fa1f39a0fd9a9d7c2c38214 diff -Nurp a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c --- a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c 1970-01-01 08:00:00.000000000 +0800 +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-1.c 2020-07-09 11:05:23.136000000 +0800 @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -fexceptions -fnon-call-exceptions -ftree-loop-vectorize -fno-tree-sink --param dse-max-alias-queries-per-store=2 -w" } */ + +void +di (int y9, int qw) +{ + if ((int) &y9 != 0) + { + int py; + int **fq = &py; + + while (qw < 1) + { + if ((0 < (**fq ? **fq : (**fq = 1))) / (**fq = y9)) + ; + + ++qw; + } + } +} diff -Nurp a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c --- a/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c 1970-01-01 08:00:00.000000000 +0800 +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr92085-2.c 2020-07-09 11:05:23.136000000 +0800 @@ -0,0 +1,29 @@ +/* { dg-do compile } */ +/* { dg-options "-O1 -ftree-loop-vectorize -fno-tree-dce -fno-tree-sink -w" } */ + +int a8; + +void +c1 (int oz, int dk, int ub) +{ + int *hd = 0; + long int *th = &dk; + + while (ub < 1) + { + oz || dk; + ++ub; + } + + while (oz < 2) + { + long int *lq = &oz; + + (*hd < (*lq = *th)) < oz; + + if (oz == 0) + *th = a8 = oz; + + *lq = 0; + } +} diff -Nurp a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c --- a/gcc/tree-if-conv.c 2020-07-09 11:04:58.832000000 +0800 +++ b/gcc/tree-if-conv.c 2020-07-09 11:05:23.136000000 +0800 @@ -2984,10 +2984,11 @@ ifcvt_local_dce (class loop *loop) ao_ref write; ao_ref_init (&write, lhs); - if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef) - == DSE_STORE_DEAD) - delete_dead_or_redundant_assignment (&gsi, "dead"); - gsi_next (&gsi); + if (dse_classify_store (&write, stmt, false, NULL, NULL, latch_vdef) + == DSE_STORE_DEAD) + delete_dead_or_redundant_assignment (&gsi, "dead"); + else + gsi_next (&gsi); continue; }