aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/module.cc
diff options
context:
space:
mode:
authorLi Wei <liwei@loongson.cn>2024-01-24 17:44:17 +0800
committerLulu Cheng <chenglulu@loongson.cn>2024-01-26 16:10:40 +0800
commit58a27738c57fbf73c367b85537b714c29e0d5825 (patch)
tree65c63473ac653f5e9c8a3db875bc6036c686a3a3 /gcc/cp/module.cc
parentbfd6b36f08021f023e0e9223f5aea315b74a5c56 (diff)
downloadgcc-58a27738c57fbf73c367b85537b714c29e0d5825.zip
gcc-58a27738c57fbf73c367b85537b714c29e0d5825.tar.gz
gcc-58a27738c57fbf73c367b85537b714c29e0d5825.tar.bz2
LoongArch: Optimize implementation of single-precision floating-point approximate division.
We found that in the spec17 521.wrf program, some loop invariant code generated from single-precision floating-point approximate division calculation failed to propose a loop. This is because the pseudo-register that stores the intermediate temporary calculation results is rewritten in the implementation of single-precision floating-point approximate division, failing to propose invariants in the loop2_invariant pass. To this end, the intermediate temporary calculation results are stored in new pseudo-registers without destroying the read-write dependency, so that they could be recognized as loop invariants in the loop2_invariant pass. After optimization, the number of instructions of 521.wrf is reduced by 0.18% compared with before optimization (1716612948501 -> 1713471771364). gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_emit_swdivsf): Adjust. gcc/testsuite/ChangeLog: * gcc.target/loongarch/invariant-recip.c: New test.
Diffstat (limited to 'gcc/cp/module.cc')
0 files changed, 0 insertions, 0 deletions