diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2015-08-20 11:36:00 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2015-08-20 11:36:00 +0000 |
commit | 30aa6349e193c1164ab0fba1de332053c2d2ed51 (patch) | |
tree | 11f043b5013d3e1565449ccb0c9b5400f3da3768 | |
parent | 5fc6ae7dab2809a4607de11b2c4e48752176a562 (diff) | |
download | gcc-30aa6349e193c1164ab0fba1de332053c2d2ed51.zip gcc-30aa6349e193c1164ab0fba1de332053c2d2ed51.tar.gz gcc-30aa6349e193c1164ab0fba1de332053c2d2ed51.tar.bz2 |
predicates.md (vector_all_ones_operand): Use CONSTM1_RTX to simplify definition.
gcc/
* config/i386/predicates.md (vector_all_ones_operand): Use
CONSTM1_RTX to simplify definition.
From-SVN: r227032
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/predicates.md | 22 |
2 files changed, 8 insertions, 19 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b327385..21ea2f2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-20 Richard Sandiford <richard.sandiford@arm.com> + + * config/i386/predicates.md (vector_all_ones_operand): Use + CONSTM1_RTX to simplify definition. + 2015-08-20 Richard Biener <rguenther@suse.de> * toplev.c (compile_file): Remove loop calling late_global_decl diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index a9c8623..bc76a5b 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -912,25 +912,9 @@ /* Return true if operand is a vector constant that is all ones. */ (define_predicate "vector_all_ones_operand" - (match_code "const_vector") -{ - int nunits = GET_MODE_NUNITS (mode); - - if (GET_CODE (op) == CONST_VECTOR - && CONST_VECTOR_NUNITS (op) == nunits) - { - int i; - for (i = 0; i < nunits; ++i) - { - rtx x = CONST_VECTOR_ELT (op, i); - if (x != constm1_rtx) - return false; - } - return true; - } - - return false; -}) + (and (match_code "const_vector") + (match_test "INTEGRAL_MODE_P (GET_MODE (op))") + (match_test "op == CONSTM1_RTX (GET_MODE (op))"))) ; Return true when OP is operand acceptable for standard SSE move. (define_predicate "vector_move_operand" |