aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/aarch64/predicates.md
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2014-07-31 15:31:24 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2014-07-31 15:31:24 +0000
commit988fa69392bb0edcece6db817ef5a3dfb09907fa (patch)
treec06f413cb718bc0d68ffa6007f06a2d0c7f11744 /gcc/config/aarch64/predicates.md
parent08938c896fd1a409bd70218154b7073e81de398e (diff)
downloadgcc-988fa69392bb0edcece6db817ef5a3dfb09907fa.zip
gcc-988fa69392bb0edcece6db817ef5a3dfb09907fa.tar.gz
gcc-988fa69392bb0edcece6db817ef5a3dfb09907fa.tar.bz2
[AArch64_be] Fix vec_select hi/lo mask confusions.
gcc/ * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Vary the generated mask based on BYTES_BIG_ENDIAN. (aarch64_simd_check_vect_par_cnst_half): New. * config/aarch64/aarch64-protos.h (aarch64_simd_check_vect_par_cnst_half): New. * config/aarch64/predicates.md (vect_par_cnst_hi_half): Refactor the check out to aarch64_simd_check_vect_par_cnst_half. (vect_par_cnst_lo_half): Likewise. * config/aarch64/aarch64-simd.md (aarch64_simd_move_hi_quad_<mode>): Always use vec_par_cnst_lo_half. (move_hi_quad_<mode>): Always generate a low mask. From-SVN: r213378
Diffstat (limited to 'gcc/config/aarch64/predicates.md')
-rw-r--r--gcc/config/aarch64/predicates.md51
1 files changed, 2 insertions, 49 deletions
diff --git a/gcc/config/aarch64/predicates.md b/gcc/config/aarch64/predicates.md
index 2702a3c..95d1910 100644
--- a/gcc/config/aarch64/predicates.md
+++ b/gcc/config/aarch64/predicates.md
@@ -207,62 +207,15 @@
(define_special_predicate "vect_par_cnst_hi_half"
(match_code "parallel")
{
- HOST_WIDE_INT count = XVECLEN (op, 0);
- int nunits = GET_MODE_NUNITS (mode);
- int i;
-
- if (count < 1
- || count != nunits / 2)
- return false;
-
- if (!VECTOR_MODE_P (mode))
- return false;
-
- for (i = 0; i < count; i++)
- {
- rtx elt = XVECEXP (op, 0, i);
- int val;
-
- if (GET_CODE (elt) != CONST_INT)
- return false;
-
- val = INTVAL (elt);
- if (val != (nunits / 2) + i)
- return false;
- }
- return true;
+ return aarch64_simd_check_vect_par_cnst_half (op, mode, true);
})
(define_special_predicate "vect_par_cnst_lo_half"
(match_code "parallel")
{
- HOST_WIDE_INT count = XVECLEN (op, 0);
- int nunits = GET_MODE_NUNITS (mode);
- int i;
-
- if (count < 1
- || count != nunits / 2)
- return false;
-
- if (!VECTOR_MODE_P (mode))
- return false;
-
- for (i = 0; i < count; i++)
- {
- rtx elt = XVECEXP (op, 0, i);
- int val;
-
- if (GET_CODE (elt) != CONST_INT)
- return false;
-
- val = INTVAL (elt);
- if (val != i)
- return false;
- }
- return true;
+ return aarch64_simd_check_vect_par_cnst_half (op, mode, false);
})
-
(define_special_predicate "aarch64_simd_lshift_imm"
(match_code "const_vector")
{