From 30aa6349e193c1164ab0fba1de332053c2d2ed51 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Thu, 20 Aug 2015 11:36:00 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/predicates.md | 22 +++------------------- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b327385dc3f..21ea2f2c351 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-20 Richard Sandiford + + * config/i386/predicates.md (vector_all_ones_operand): Use + CONSTM1_RTX to simplify definition. + 2015-08-20 Richard Biener * 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 a9c8623ada2..bc76a5b7cee 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" -- 2.30.2