Skip to content
Snippets Groups Projects
Commit 61400b66 authored by Deng Jianbo's avatar Deng Jianbo Committed by Lulu Cheng
Browse files

LoongArch: Optimize initializing fp resgister to zero

In LoongArch, currently uses instruction movgr2fr.{d|w} to move zero
from fixed-point register to floating-pointer regsiter for initializing
fp register to zero. When LSX or LASX is enabled, we can use instruction
vxor.v which has lower latency than instruction movgr2fr.{d|w} to set fp
register to zero directly.

gcc/ChangeLog:

	* config/loongarch/loongarch.cc (loongarch_output_move):
	Optimize instructions for initializing fp regsiter to zero.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/mov-zero-1.c: New test.
	* gcc.target/loongarch/mov-zero-2.c: New test.
parent 1ea6fef4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment