aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2019-12-02 17:39:06 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2019-12-02 17:39:06 +0000
commit0435b10db008e3019be0898270070eec4f3e318a (patch)
tree96d50c1a58cb3a70e9d378758c766f97cb39ce6d /gcc/fold-const.c
parentd6098f64819e729026df0ebf0e18ac5de713e36e (diff)
downloadgcc-0435b10db008e3019be0898270070eec4f3e318a.zip
gcc-0435b10db008e3019be0898270070eec4f3e318a.tar.gz
gcc-0435b10db008e3019be0898270070eec4f3e318a.tar.bz2
[AArch64] Add a couple of SVE ACLE comparison folds
When writing vector-length specific SVE code, it's useful to be able to store an svbool_t predicate in a GNU vector of unsigned chars. This patch makes sure that there is no overhead when converting to that form and then immediately reading it back again. 2019-12-02 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64-sve-builtins.h (gimple_folder::force_vector): Declare. * config/aarch64/aarch64-sve-builtins.cc (gimple_folder::force_vector): New function. * config/aarch64/aarch64-sve-builtins-base.cc (svcmp_impl::fold): Likewise. (svdup_impl::fold): Handle svdup_z too. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/eqne_dup_1.c: New test. * gcc.target/aarch64/sve/acle/asm/dup_f16.c (dup_0_f16_z): Expect the call to be folded to zero. * gcc.target/aarch64/sve/acle/asm/dup_f32.c (dup_0_f32_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_f64.c (dup_0_f64_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_s8.c (dup_0_s8_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_s16.c (dup_0_s16_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_s32.c (dup_0_s32_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_s64.c (dup_0_s64_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_u8.c (dup_0_u8_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_u16.c (dup_0_u16_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_u32.c (dup_0_u32_z): Likewise. * gcc.target/aarch64/sve/acle/asm/dup_u64.c (dup_0_u64_z): Likewise. From-SVN: r278907
Diffstat (limited to 'gcc/fold-const.c')
0 files changed, 0 insertions, 0 deletions