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

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
(In reply to Michael Meissner from comment #0)
> I build a GCC trunk on the gcc110 cfarm system.  I got the following
> failures when I built GCC without using --with-cpu=<xxx>.  These failures
> are gone if I used --with-cpu=power7:
> 
> GCC tests:
> gcc.dg/fold-copysign-1.c

If I look at the test case above, compiling with -mcpu=power4 (the default when
not building with --with-cpu=) and -mcpu=power7, the generated assembly is
identical.  What FAILs is the scan of the dump file looking for
__builtin_copysign and that is not found in the -mcpu=power4 compile.  The diff
of the two dump files show:

-;; Function bar (bar, funcdef_no=1, decl_uid=3529, cgraph_uid=2,
symbol_order=1)
+;; Function bar (bar, funcdef_no=1, decl_uid=3923, cgraph_uid=2,
symbol_order=1)

 double bar (double x)
 {
   double _3;
-  double _5;

   <bb 2> :
-  _5 = ABS_EXPR <x_2(D)>;
-  _3 = -_5;
+  _3 = __builtin_copysign (x_2(D), -0.0);
   return _3;

 }

I'll mention the -mcpu=power{4,5,5+} dump outputs are all similar and the
-mcpu=power{6,7,8,9,10} outputs are all similar.

Reply via email to