Why compilers don't generate vroundsd reg,reg,reg,0 ?

By: Michael S (already5chosen.delete@this.yahoo.com), June 7, 2019 4:18 am
Room: Moderated Discussions
I am talking about inlining of "C" round().

Experimentally, no compiler that I tried, at home or on Goldbolt, under no flags, including -ffast-math.
generates 'vroundsd xmm0, xmm0, xmm0,0' (==_MM_FROUND_TO_NEAREST_INT) or 'vroundsd xmm0, xmm0, xmm0,8' (==_MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC). The same for 'vroundpd' in vectorizable loops.

Is there a subtile, but mighty important semantics difference between "C" round() and x86 'vroundsd xmm0, xmm0, xmm0,0' that I am missing?

Godbolt link

 Next Post in Thread >
TopicPosted ByDate
Why compilers don't generate vroundsd reg,reg,reg,0 ?Michael S2019/06/07 04:18 AM
  got itMichael S2019/06/07 06:40 AM
    got itTravis Downs2019/06/07 10:54 AM
      got itMichael S2019/06/10 04:21 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell green?