Skip to content
Snippets Groups Projects
Commit d953c2c5 authored by Tsung Chun Lin's avatar Tsung Chun Lin Committed by Jeff Law
Browse files

Prefer scalar_int_mode if the size - 1 is equal to UNITS_PER_WORD.

Don't use the QI vector if its size is equal to UNITS_PER_WORD for
better code generation.

Before patch:

vsetivli        zero,4,e8,mf4,ta,ma
vmv.v.i v1,0
addi    a4,sp,12
vse8.v  v1,0(a4)

After patch:

sw      zero,12(sp)

gcc/
	* expr.cc (widest_fixed_size_mode_for_size): Prefer scalar modes
	over vector modes in more cases.

gcc/testsuite/

	* gcc.target/riscv/rvv/autovec/pr113469.c: Update expected output.
	* gcc.target/riscv/rvv/base/movqi-1.c: New test.
parent c6b5398e
No related branches found
No related tags found
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