Hi, The Power8 swap optimization pass contains a mini-pass to replace certain patterns prior to swap optimization proper. In order for this not to distort the dataflow information for swap optimization, we should process all the deferred rescans between the two passes. Currently that is not done. This patch fixes that.
Bootstrapped and tested on powerpc64le-linux-gnu with no regressions. Is this ok for trunk? Thanks, Bill 2017-10-04 Bill Schmidt <wschm...@linux.vnet.ibm.com> * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process deferred rescans after the lvx/stvx recombination pre-pass. Index: gcc/config/rs6000/rs6000-p8swap.c =================================================================== --- gcc/config/rs6000/rs6000-p8swap.c (revision 253388) +++ gcc/config/rs6000/rs6000-p8swap.c (working copy) @@ -1882,6 +1882,7 @@ rs6000_analyze_swaps (function *fun) /* Pre-pass to recombine lvx and stvx patterns so we don't lose info. */ recombine_lvx_stvx_patterns (fun); + df_process_deferred_rescans (); /* Allocate structure to represent webs of insns. */ insn_entry = XCNEWVEC (swap_web_entry, get_max_uid ());