Lower for loops before lowering cond in genmatch
authorAndrew Pinski <apinski@marvell.com>
Sun, 13 Jun 2021 01:58:03 +0000 (18:58 -0700)
committerAndrew Pinski <apinski@marvell.com>
Sat, 26 Jun 2021 01:51:52 +0000 (18:51 -0700)
commit2afe882858699bb6c13f8502f4f6e862a126d4ef
treec08a0e4833d3856fbc936ac098b3ac9f6a1dabc2
parentfbad6c62529fd2e5dcf9f7db884cee01e9dcc4bd
Lower for loops before lowering cond in genmatch

While converting some fold_cond_expr_with_comparison
to match, I found that I wanted to use "for cnd (cond vec_cond)"
but that was not causing the lowering of cond to happen.
What was happening was the lowering of the for loop
was happening after the lowering of the cond. So
swapping was the correct thing to do but it also
means we need to copy for_subst_vec in lower_cond.

OK?  Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

* genmatch.c (lower_cond): Copy for_subst_vec
for the simplify also.
(lower): Swap the order for lower_for and lower_cond.
gcc/genmatch.c