diff options
author | Richard Henderson <rth@redhat.com> | 2010-11-15 19:45:36 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2010-11-15 19:45:36 -0800 |
commit | 180ed1b2bd57ce7f8d537db11242c18703121c78 (patch) | |
tree | c74a6e512224bd025ff8fb387939542fc6e85d25 | |
parent | 3ca35fbd596c53980b53c503ee2881a06db97735 (diff) | |
download | gcc-180ed1b2bd57ce7f8d537db11242c18703121c78.zip gcc-180ed1b2bd57ce7f8d537db11242c18703121c78.tar.gz gcc-180ed1b2bd57ce7f8d537db11242c18703121c78.tar.bz2 |
fold-const.c (operand_equal_for_comparison_p): Handle FMA_EXPR...
* fold-const.c (operand_equal_for_comparison_p): Handle FMA_EXPR,
WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR, VEC_COND_EXPR,
DOT_PROD_EXPR.
From-SVN: r166792
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fold-const.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2d6dd42..3dd8203 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2010-11-15 Richard Henderson <rth@redhat.com> + * fold-const.c (operand_equal_for_comparison_p): Handle FMA_EXPR, + WIDEN_MULT_PLUS_EXPR, WIDEN_MULT_MINUS_EXPR, VEC_COND_EXPR, + DOT_PROD_EXPR. + +2010-11-15 Richard Henderson <rth@redhat.com> + * config/mn10300/mn10300.md (fmasf4, fmssf4, fnmasf4, fnmssf4): Rename from fmaddsf4, fmsubsf4, fnmaddsf4, fnmsubsf4 respectively. Use fma rtx_code. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index b6a9814..9f1e080 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2635,6 +2635,14 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) case TRUTH_ORIF_EXPR: return OP_SAME (0) && OP_SAME (1); + case FMA_EXPR: + case WIDEN_MULT_PLUS_EXPR: + case WIDEN_MULT_MINUS_EXPR: + if (!OP_SAME (2)) + return 0; + /* The multiplcation operands are commutative. */ + /* FALLTHRU */ + case TRUTH_AND_EXPR: case TRUTH_OR_EXPR: case TRUTH_XOR_EXPR: @@ -2648,6 +2656,8 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) TREE_OPERAND (arg1, 0), flags)); case COND_EXPR: + case VEC_COND_EXPR: + case DOT_PROD_EXPR: return OP_SAME (0) && OP_SAME (1) && OP_SAME (2); default: |