Skip to content
Snippets Groups Projects
Commit 31008a8b authored by Kewen Lin's avatar Kewen Lin
Browse files

rs6000: Use subreg for QI/HI vector init

This patch is to use paradoxical subreg instead of
zero_extend for promoting QI/HI to SI/DI when we
want to construct one vector with these modes.
Since we do the gpr->vsx movement and vector merge
or pack later, the high part is useless and safe to
use paradoxical subreg.  It can avoid useless rlwinms
generated for signed cases.

Bootstrapped/regtested on powerpc64le-linux-gnu P9.

gcc/ChangeLog:

	* config/rs6000/rs6000.c (rs6000_expand_vector_init): Use
	paradoxical subreg instead of zero_extend for QI/HI promotion.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/pr96933-1.c: Adjusted to check no rlwinm.
	* gcc.target/powerpc/pr96933-2.c: Likewise.
parent a3bac404
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