Skip to content
Snippets Groups Projects
Commit 4731ead7 authored by Jiahao Xu's avatar Jiahao Xu Committed by Lulu Cheng
Browse files

LoongArch: Support immediate_operand for vec_cmp

We can't vectorize the code into instructions like vslti.w that compare
with immediate_operand, because we miss immediate_operand support for
integer comparisons.

gcc/ChangeLog:

	* config/loongarch/lasx.md (vec_cmp<mode><mode256_i>): Remove.
	(vec_cmpu<ILASX:mode><mode256_i>): Remove.
	* config/loongarch/loongarch.cc (loongarch_expand_lsx_cmp):
	Ensure vector comparison instructions support CMP_OP1.
	* config/loongarch/lsx.md (vec_cmp<mode><mode_i>): Remove.
	(vec_cmpu<ILSX:mode><mode_i>): Remove.
	* config/loongarch/simd.md (ALLVEC, allmode_i): New mode iterators.
	(vec_cmp<mode><allmode_i>): New define_expand.
	(vec_cmpu<mode><allmode_i>): Likewise.

gcc/testsuite/ChangeLog:

	* gcc.target/loongarch/vector/lasx/lasx-vcond-3.c: New test.
parent c6f7a298
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