Abstract:A basic mathematic library is one of the most basic and core underlying software in high-performance computers. Its performance directly determines the efficiency of the upper computing program. The use of rfpcr and wfpcr instructions in some functions of the current domestic SW basic mathematic library leads to the interruption of the pipeline, which reduces the performance of the functions. To solve this problem, we propose an equivalent substitution method for functions in the instruction segments by combining the effects and instruction characteristics of the functions. The experimental results show that this method can improve the performance of the functions by 27.83% on average.