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

LoongArch: Implement vector cbranch optab for LSX and LASX


In order to support vectorization of loops with multiple exits, this
patch adds the implementation of the conditional branch optab for
LoongArch LSX/LASX instructions.

This patch causes the gen-vect-{2,25}.c tests to fail.  This is because
the support for vectorizing loops with multiple exits has vectorized
the loop checking the results.  The failure is due to an issue in the
test case's own implementation.

gcc/ChangeLog:

	* config/loongarch/simd.md (cbranch<mode>4): New expander.

gcc/testsuite/ChangeLog:

	* lib/target-supports.exp (check_effective_target_vect_early_break_hw,
	check_effective_target_vect_early_break): Support LoongArch LSX.
	* gcc.target/loongarch/vector/lasx/lasx-vseteqz.c: New test.
	* gcc.target/loongarch/vector/lsx/lsx-vseteqz.c: New test.

Co-authored-by: default avatarDeng Jianbo <dengjianbo@loongson.cn>
parent 509df13f
Loading
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