https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80791
--- Comment #3 from amker at gcc dot gnu.org --- (In reply to Aldy Hernandez from comment #2) > Confirmed. Any update on this amker? > > Started with: > > commit a9b41911523c1db8042f1f3ffff8d1ed814326ef > Author: amker <amker@138bc75d-0d04-0410-961f-82ee72b054a4> > Date: Thu May 11 09:31:18 2017 +0000 > > * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify. > (adjust_setup_cost): New parameter supporting round up > adjustment. > (struct address_cost_data): Delete. > (force_expr_to_var_cost): Don't bound cost with spill_cost. > (split_address_cost, ptr_difference_cost): Delete. > (difference_cost, compare_aff_trees, record_inv_expr): Delete. > (struct ainc_cost_data): New struct. > (get_address_cost_ainc): New function. > (get_address_cost, get_computation_cost): Reimplement. > (determine_group_iv_cost_address): Record inv_expr for all uses > of > a group. > (determine_group_iv_cost_cond): Call get_loop_invariant_expr. > (iv_ca_has_deps): Reimplemented to ... > (iv_ca_more_deps): ... this. Check if NEW_CP introduces more > deps > than OLD_CP. > (iv_ca_extend): Call iv_ca_more_deps. > > > git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@247885 > 138bc75d-0d04-0410-96 > 1f-82ee72b054a4 Hmm, could you please provide the configuration of GCC? I tried to reproduce with below configuration: ../gcc/configure --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-elf --prefix=/.../target/ --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-sysroot=/.../target/powerpc-elf --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-languages=c,c++,lto The result GCC always fails SMS on power6, even with r247884; and it always succeeds SMS on power7. Like: ./powerpc-elf-gcc -O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms sms-1.c -o sms-1.S -S -mcpu=power7 ./powerpc-elf-gcc -O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms sms-1.c -o sms-1.S -S -mcpu=power6 Thanks.