Hi, We've done some experimenting and realized that the subject option almost always provide improved performance for Power when the loop unroller is enabled. So this patch turns that flag on by default for us.
Bootstrapped and tested on powerpc64le-unknown-linux-gnu with no regressions. Is this OK for trunk? Thanks! Bill 2019-06-27 Bill Schmidt <wschm...@linux.ibm.com> * config/rs6000/rs6000.c (rs6000_option_override_internal): Enable -fvariable-expansion-in-unroller by default. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 272719) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -3616,6 +3616,11 @@ rs6000_option_override_internal (bool global_init_ && !global_options_set.x_flag_asynchronous_unwind_tables) flag_asynchronous_unwind_tables = 1; + /* -fvariable-expansion-in-unroller is a win for POWER whenever the + loop unroller is active. It is only checked during unrolling, so + we can just set it on by default. */ + flag_variable_expansion_in_unroller = 1; + /* Set the pointer size. */ if (TARGET_64BIT) {