Skip to content
Snippets Groups Projects
Commit 9ea9d059 authored by Pan Li's avatar Pan Li
Browse files

RISC-V: Allow IMM operand for unsigned scalar .SAT_ADD


This patch would like to allow the IMM operand of the unsigned
scalar .SAT_ADD.  Like the operand 0, the operand 1 of .SAT_ADD
will be zero extended to Xmode before underlying code generation.

The below test suites are passed for this patch.
* The rv64gcv fully regression test.

gcc/ChangeLog:

	* config/riscv/riscv.cc (riscv_expand_usadd): Zero extend
	the second operand of usadd as the first operand does.
	* config/riscv/riscv.md (usadd<m>3): Allow imm operand for
	scalar usadd pattern.

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/sat_u_add-11.c: Make asm check robust.
	* gcc.target/riscv/sat_u_add-15.c: Ditto.
	* gcc.target/riscv/sat_u_add-19.c: Ditto.
	* gcc.target/riscv/sat_u_add-23.c: Ditto.
	* gcc.target/riscv/sat_u_add-3.c: Ditto.
	* gcc.target/riscv/sat_u_add-7.c: Ditto.

Signed-off-by: default avatarPan Li <pan2.li@intel.com>
parent d8bc31d9
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