[Bug tree-optimization/90106] builtin sqrt() ignoring libm's sqrt call result

JunMa at linux dot alibaba.com gcc-bugzilla@gcc.gnu.org
Mon May 20 09:56:00 GMT 2019


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

--- Comment #15 from JunMa <JunMa at linux dot alibaba.com> ---
(In reply to Christophe Lyon from comment #14)
> Sure, here is the contents of cdce3.c.105t.cdce:
> 
> ;; Function foo (foo, funcdef_no=0, decl_uid=4197, cgraph_uid=1,
> symbol_order=0)
> 
> foo (float x)
> {
>   float _4;
> 
>   <bb 2> [local count: 1073741824]:
>   _4 = sqrtf (x_2(D));
>   return _4;
> 
> }

The contents are as same as cdce3.c.104t.stdarg. Would you please dump it whit
-fdump-tree-cdce-details?

Then we can see(in x86_64)
   Found conditional dead call: _4 = sqrtf (x_2(D));

   cdce3.c:9: note: function call is shrink-wrapped into error conditions.

It seems that gcc thinks arm doesn't support direct internal function (maybe
vsqrt instruction ?) of sqrtf .


More information about the Gcc-bugs mailing list