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

--- Comment #5 from Alexander Fomin <afomin.mailbox at gmail dot com> ---
Created attachment 36500
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36500&action=edit
Folding regression reproducer

Unfortunately, it does not for x86-64.
Please take a look at the attached reproducer.
When compiling with -m64 -O2 -ffast-math -S it does not perform expected 
folding.

r228614
<bb 2>:
y.1_2 = y;
_3 = __builtin_sqrt (y.1_2);
*x_4(D) = _3;
powroot_18 = __builtin_sqrt (_3);
powroot_19 = _3 * powroot_18;
powroot_20 = y.1_2 * powroot_19;
y = powroot_20;

r228616
<bb 2>:
y.1_2 = y;
_3 = __builtin_sqrt (y.1_2);
*x_4(D) = _3;
powroot_18 = __builtin_pow (y.1_2, 2.5e-1);
powroot_19 = _3 * powroot_18;
powroot_20 = y.1_2 * powroot_19;
y = powroot_20;

Reply via email to