gcc 4.8 AVX optimization bug: extra code insertion?

前端 未结 2 1849
被撕碎了的回忆
被撕碎了的回忆 2021-01-23 04:25

It is great that gcc compiler 4.8 comes with AVX optimization with -Ofast option. However, I found an interesting but stupid bug, that it adds additional computations which are

2条回答
  •  孤城傲影
    2021-01-23 04:59

    I think what you are seeing in the generated code is an additional iteration of Newton-Raphson to refine the initial estimate provided by vrcpps. (See: the Intel Intrinsics Guide for details of the accuracy of the initial estimate provided by vrcpps.)

提交回复
热议问题