-
- Downloads
PHIOPT: Improve replace_phi_edge_with_variable for diamond shapped bb
While looking at differences between what minmax_replacement and match_simplify_replacement does. I noticed that they sometimes chose different edges to remove. I decided we should be able to do better and be able to remove both empty basic blocks in the case of match_simplify_replacement as that moves the statements. This also updates the testcases as now match_simplify_replacement will remove the unused MIN/MAX_EXPR and they were checking for those. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: * tree-ssa-phiopt.cc (replace_phi_edge_with_variable): Handle diamond form bb with forwarder only empty blocks better. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/minmax-15.c: Update test. * gcc.dg/tree-ssa/minmax-16.c: Update test. * gcc.dg/tree-ssa/minmax-3.c: Update test. * gcc.dg/tree-ssa/minmax-4.c: Update test. * gcc.dg/tree-ssa/minmax-5.c: Update test. * gcc.dg/tree-ssa/minmax-8.c: Update test.
Showing
- gcc/testsuite/gcc.dg/tree-ssa/minmax-15.c 2 additions, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/minmax-15.c
- gcc/testsuite/gcc.dg/tree-ssa/minmax-16.c 3 additions, 6 deletionsgcc/testsuite/gcc.dg/tree-ssa/minmax-16.c
- gcc/testsuite/gcc.dg/tree-ssa/minmax-3.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/minmax-3.c
- gcc/testsuite/gcc.dg/tree-ssa/minmax-4.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/minmax-4.c
- gcc/testsuite/gcc.dg/tree-ssa/minmax-5.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/minmax-5.c
- gcc/testsuite/gcc.dg/tree-ssa/minmax-8.c 1 addition, 1 deletiongcc/testsuite/gcc.dg/tree-ssa/minmax-8.c
- gcc/tree-ssa-phiopt.cc 34 additions, 1 deletiongcc/tree-ssa-phiopt.cc
Loading
Please register or sign in to comment