Fold MASK_LOAD/STORE with an all-true mask
This patch folds IFN_MASK_LOAD and IFN_MASK_STOREs to normal accesses
if the mask is all-true. This can happen for fully-masked loops that
didn't actually need to be (which could be handled by the vectoriser
instead), or for unrolled fully-masked loops whose first iteration is
guaranteed to operate on a full vector. It's also useful when the
accesses are generated directly by intrinsics (to follow for SVE).
2019-08-05 Richard Sandiford <richard.sandiford@arm.com>
gcc/
* gimple-fold.c (gimple_fold_mask_load_store_mem_ref)
(gimple_fold_mask_load, gimple_fold_mask_store): New functions.
(gimple_fold_call): Use them to fold IFN_MASK_LOAD and
IFN_MASK_STORE.
gcc/testsuite/
* gcc.target/aarch64/sve/mask_load_1.c: New test.
From-SVN: r274118