Using cross-compiler for ppc64-linux-gnu (on x86_64-linux-gnu) I see: ppc64-linux-gnu-gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c -Ofast -mno-powerpc-gfxopt -mcmpb -c /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c: In function ‘test_float_sqrt’: /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c:518:13: internal compiler error: Segmentation fault f1[i] = __builtin_sqrtf (f2[i]); ^~~~~~~~~~~~~~~~~~~~~~~ 0xb7b6cf crash_signal .././../gcc/toplev.c:337 0x845b9d emit_move_insn(rtx_def*, rtx_def*) .././../gcc/expr.c:3697 0xed6c7c rs6000_emit_swsqrt(rtx_def*, rtx_def*, bool) .././../gcc/config/rs6000/rs6000.c:37570 0x104722a gen_sqrtsf2(rtx_def*, rtx_def*) .././../gcc/config/rs6000/rs6000.md:4612 0xa85ac8 maybe_expand_insn(insn_code, unsigned int, expand_operand*) .././../gcc/optabs.c:7078 0xa85ac8 expand_insn(insn_code, unsigned int, expand_operand*) .././../gcc/optabs.c:7109 0x95cb84 expand_direct_optab_fn .././../gcc/internal-fn.c:2550 0x735a6d expand_call_stmt .././../gcc/cfgexpand.c:2584 0x735a6d expand_gimple_stmt_1 .././../gcc/cfgexpand.c:3571 0x735a6d expand_gimple_stmt .././../gcc/cfgexpand.c:3737 0x73729e expand_gimple_basic_block .././../gcc/cfgexpand.c:5744 0x73d0b6 execute .././../gcc/cfgexpand.c:6357 GCC 5 works fone.
Can't reproduce, rs6000_emit_swsqrt isn't called in my case.
There's reduced test-case: ******** /tmp/ppc-ice.c ******** float a, b; void c () { a = __builtin_sqrtf (b); } $ ppc64-linux-gnu-gcc -Ofast -mno-powerpc-gfxopt -mcmpb -c ppc-ice.c --verbose Using built-in specs. COLLECT_GCC=ppc64-linux-gnu-gcc Target: ppc64-linux-gnu Configured with: ./../configure --enable-linker-build-id --prefix=/home/marxin/BIG/buildbot/slave/gcc-master-build-ppc64/../install/gcc-6fe883d64cf228785f3d0a4e24f9138c8958c93b --target=ppc64-linux-gnu --with-as=/usr/bin/powerpc64-suse-linux-as --disable-bootstrap ... /home/marxin/BIG/buildbot/slave/install/gcc-6fe883d64cf228785f3d0a4e24f9138c8958c93b/bin/../lib/gcc/ppc64-linux-gnu/7.0.1/cc1 -quiet -v -iprefix /home/marxin/BIG/buildbot/slave/install/gcc-6fe883d64cf228785f3d0a4e24f9138c8958c93b/bin/../lib64/gcc/ppc64-linux-gnu/7.0.1/ -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix ppc-ice.c -quiet -dumpbase ppc-ice.c -mno-powerpc-gfxopt -mcmpb -auxbase ppc-ice -Ofast -version -o /tmp/ccSq65JO.s Hope you'll reproduce it now.
The problem is the -mno-powerpc-gfxopt option disables floating point conditional moves, which is needed to use the floating point reciprocal estimate instructions. The macro TARGET_FRSQRTES did not have a check for GFXOPT.
Created attachment 40976 [details] Proposed patch to fix the problem The tARGET_RSQRTES macro needed a guard to require -mpowerpc-gfxopt.
Author: meissner Date: Wed Mar 15 00:25:10 2017 New Revision: 246150 URL: https://gcc.gnu.org/viewcvs?rev=246150&root=gcc&view=rev Log: [gcc] 2017-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/79947 * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for -mpowerpc-gfxopt. [gcc/testsuite] 2017-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/79947 * gcc.target/powerpc/pr79947.c: New test. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr79947.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.h trunk/gcc/testsuite/ChangeLog
Author: meissner Date: Mon Apr 3 22:57:32 2017 New Revision: 246665 URL: https://gcc.gnu.org/viewcvs?rev=246665&root=gcc&view=rev Log: [gcc] 2017-04-03 Michael Meissner <meissner@linux.vnet.ibm.com> Back port from the trunk 2017-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/79947 * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for -mpowerpc-gfxopt. [gcc/testsuite] 2017-04-03 Michael Meissner <meissner@linux.vnet.ibm.com> Back port from the trunk 2017-03-14 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/79947 * gcc.target/powerpc/pr79947.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr79947.c - copied unchanged from r246661, trunk/gcc/testsuite/gcc.target/powerpc/pr79947.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/config/rs6000/rs6000.h branches/gcc-6-branch/gcc/testsuite/ChangeLog
Fixed in the trunk with subversion id 246150, and back ported to GCC 6 with subversion id 246150.