LoongArch: Fix ICE caused by illegal calls to builtin functions [PR118561].

	PR target/118561

gcc/ChangeLog:

	* config/loongarch/loongarch-builtins.cc
	(loongarch_expand_builtin_lsx_test_branch):
	NULL_RTX will not be returned when an error is detected.
	(loongarch_expand_builtin): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/pr118561.c: New test.

(cherry picked from commit 50d2bde68a097c2e9fb3bdd7e6664c8988889828)
2 files changed