http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58160
Bug ID: 58160 Summary: Power8 fusion support has a bug that shows up in running spec 2006 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: meissner at gcc dot gnu.org In running the spec 2006 testsuite with several options, we discovered that -mtune=power8 (which turns on the -mpower8-fusion option) has a segmentation fault in two benchmarks: 403.gcc when built with -O2 -mcpu=power7 -mtune=power8 -m32 435.gromacs when built with -O3 -funroll-loops -mcpu=power7 -mtune=power8 -m32 In the gcc case, I tracked it down to the fusion op in the function strength_reduce in the file loop.c. It was wanting to use the result of the addis instruction after the loop. It wanted to optimize: lis 10,loop_dump_stream@ha lwz 6,loop_dump_stream@l(6) stw 10,24(1) to: lis 6,loop_dump_stream@ha lwz 6,loop_dump_stream@l(6) stw 10,24(1) The problem is fusion was implemented using define_peephole, and the register live notes are not correct when peepholes are done.