[Bug target/82848] [8 Regression] ICE in expand_expr_real_2, at expr.c:8715

willschm at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Nov 17 21:17:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82848

--- Comment #3 from Will Schmidt <willschm at gcc dot gnu.org> ---

(In reply to Martin Liška from comment #0)
> Note that GCC 7.1 did:
> 
> $ powerpc64-suse-linux-gcc-7
> /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/pr37168.c -c 
> /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/pr37168.c: In
> function 'foo':
> /home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/pr37168.c:12:
> 16: error: Builtin function __builtin_altivec_vmaddfp requires the -maltivec
> option
>    vector float b = __builtin_vec_madd (b, a, (vector float) { C, C, C, C });
>                 ^
> 
> So the error somehow disappeared.

Yes,.. with the gimple-folding in place, that particular function (at .gimple
time) is no longer in play.
  bD.2759 = __builtin_altivec_vmaddfpD.1680 (bD.2759, aD.2756, {
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44 });
is now
  bD.2759 = bD.2759 * aD.2756 + {
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44,
3.64337600724452438440169691655378194132868104887894100657e-44 };
.  

If you use the option " -mno-fold-gimple " you should get the un-folded
behavior.  Which would be good to confirm this is the root cause, but not
long-term recommended for optimization reasons.

So all that said.. I'm struggling to recreate this one.   
My latest attempt was on gcc110.  I've tried on a few other power systems, with
similar/same results.

Anything obvious that I may have mis-configured here?

[willschm@gcc1-power7 gcc]$ /home/willschm/gcc/install/gcc/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/home/willschm/gcc/install/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/home/willschm/gcc/install/gcc/libexec/gcc/powerpc64-unknown-linux-gnu/8.0.0/lto-wrapper
Target: powerpc64-unknown-linux-gnu
Configured with: ../../src/gcc/configure
--enable-languages=c,c++,fortran,objc,obj-c++ --with-cpu=power7
--with-long-double-128 --prefix=/home/willschm/gcc/install/gcc/
--disable-bootstrap
Thread model: posix
gcc version 8.0.0 20171117 (experimental) (GCC) 

[willschm@gcc1-power7 gcc]$ /home/willschm/gcc/install/gcc/bin/gcc 
/home/willschm/gcc/src/gcc/gcc/testsuite/gcc.target/powerpc/pr37168.c -c
[willschm@gcc1-power7 gcc]$ ls -lart pr37168.o 
-rw-rw-r--. 1 willschm willschm 1200 Nov 17 21:06 pr37168.o


More information about the Gcc-bugs mailing list