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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #6)
> ah, probably it's the missing CSE there:
> 
>     <bb 3> :
>     _1 = (float) l_10;
>     _2 = _1 < 0.0;
>     zone1_17 = (int) _2;
>     if (_1 < 0.0)
> 
> we are not considering to replace the FP compare control if (_1 < 0.0)
> with an integer compare control if (_2 != 0).  Maybe we should do that?

Just to note it's forwprop which introudces the FP control stmt:

   _1 = (float) l_10;
   _2 = _1 < 0.0;
   zone1_17 = (int) _2;
-  zone1.1_18 = zone1_17;
-  if (zone1.1_18 != 0)
+  if (_1 < 0.0)
     goto <bb 4>; [INV]
   else
     goto <bb 5>; [INV]

   <bb 4> :
-  iftmp.0_20 = zone1.1_18;

   <bb 5> :
-  # iftmp.0_11 = PHI <iftmp.0_20(4), 1(3)>
+  # iftmp.0_11 = PHI <zone1_17(4), 1(3)>

that makes the situation more difficult for VRP, I suppose that relations
should still allow us to see zone1_17(4) is 1 on the edge 3->4?  For
value-numbering the situation is not easily resovable.

Reply via email to