diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2013-03-21 17:33:33 +0100 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2013-03-21 16:33:33 +0000 |
commit | 08e0cda61db940bb3b312b44b6d96219f697c27a (patch) | |
tree | 32255bfeab9804ebb6cbd03117e49ca038c33706 /gcc/cp/call.c | |
parent | d08633b496a5820431e4049ee8a564796a42114d (diff) | |
download | gcc-08e0cda61db940bb3b312b44b6d96219f697c27a.zip gcc-08e0cda61db940bb3b312b44b6d96219f697c27a.tar.gz gcc-08e0cda61db940bb3b312b44b6d96219f697c27a.tar.bz2 |
tree.h (VECTOR_TYPE_P): New macro.
2013-03-21 Marc Glisse <marc.glisse@inria.fr>
gcc/
* tree.h (VECTOR_TYPE_P): New macro.
(VECTOR_INTEGER_TYPE_P, VECTOR_FLOAT_TYPE_P, FLOAT_TYPE_P,
TYPE_MODE): Use it.
* fold-const.c (fold_cond_expr_with_comparison): Use build_zero_cst.
VEC_COND_EXPR cannot be lvalues.
(fold_ternary_loc) <VEC_COND_EXPR>: Merge with the COND_EXPR case.
gcc/cp/
* call.c (build_conditional_expr_1): Fold VEC_COND_EXPR.
gcc/testsuite/
* g++.dg/ext/vector21.C: New testcase.
From-SVN: r196884
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 8362c75..5c9c286 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -4437,9 +4437,9 @@ build_conditional_expr_1 (tree arg1, tree arg2, tree arg3, } if (!COMPARISON_CLASS_P (arg1)) - arg1 = build2 (NE_EXPR, signed_type_for (arg1_type), arg1, + arg1 = fold_build2 (NE_EXPR, signed_type_for (arg1_type), arg1, build_zero_cst (arg1_type)); - return build3 (VEC_COND_EXPR, arg2_type, arg1, arg2, arg3); + return fold_build3 (VEC_COND_EXPR, arg2_type, arg1, arg2, arg3); } /* [expr.cond] |