aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-semantics.c
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2017-12-21 16:39:43 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2017-12-21 16:39:43 +0000
commit6b6d8f38f7b3bd8a2f4e4dbeb3014ba1339afa89 (patch)
treea26bfcca0fadf5099804a4c2887409b687957d8e /gcc/c-family/c-semantics.c
parentc587c0a9c8cbe80a64461fe9cab0a23d3ff35211 (diff)
downloadgcc-6b6d8f38f7b3bd8a2f4e4dbeb3014ba1339afa89.zip
gcc-6b6d8f38f7b3bd8a2f4e4dbeb3014ba1339afa89.tar.gz
gcc-6b6d8f38f7b3bd8a2f4e4dbeb3014ba1339afa89.tar.bz2
[patch AArch64] Do not perform a vector splat for vector initialisation if it is not useful
Our current vector initialisation code will first duplicate the first element to both lanes, then overwrite the top lane with a new value. This duplication can be clunky and wasteful. Better would be to simply use the fact that we will always be overwriting the remaining bits, and simply move the first element to the corrcet place (implicitly zeroing all other bits). We also need a new pattern in simplify-rtx.c:simplify_ternary_operation , to ensure we can still simplify: (vec_merge:OUTER (vec_duplicate:OUTER x:INNER) (subreg:OUTER y:INNER 0) (const_int N)) To: (vec_concat:OUTER x:INNER y:INNER) or (vec_concat y x) --- gcc/ * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code generation for cases where splatting a value is not useful. * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge across a vec_duplicate and a paradoxical subreg forming a vector mode to a vec_concat. gcc/testsuite/ * gcc.target/aarch64/vect-slp-dup.c: New. From-SVN: r255946
Diffstat (limited to 'gcc/c-family/c-semantics.c')
0 files changed, 0 insertions, 0 deletions