]> git.ipfire.org Git - thirdparty/gcc.git/commit
PR c++/85052
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jan 2019 08:49:08 +0000 (08:49 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 7 Jan 2019 08:49:08 +0000 (08:49 +0000)
commit59409f0969d8f2d92633c0d3b3b593aeeb85798c
tree3ebde208f2b05c57fa2ce4a941e6c4e7811e82c3
parented42202dbc79959cf07a8ba2d2ca5376c7dbbb11
PR c++/85052
* tree-vect-generic.c: Include insn-config.h and recog.h.
(expand_vector_piecewise): Add defaulted ret_type argument,
if non-NULL, use that in preference to type for the result type.
(expand_vector_parallel): Formatting fix.
(do_vec_conversion, do_vec_narrowing_conversion,
expand_vector_conversion): New functions.
(expand_vector_operations_1): Call expand_vector_conversion
for VEC_CONVERT ifn calls.
* internal-fn.def (VEC_CONVERT): New internal function.
* internal-fn.c (expand_VEC_CONVERT): New function.
* fold-const-call.c (fold_const_vec_convert): New function.
(fold_const_call): Use it for CFN_VEC_CONVERT.
* doc/extend.texi (__builtin_convertvector): Document.
c-family/
* c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
(c_build_vec_convert): Declare.
* c-common.c (c_build_vec_convert): New function.
c/
* c-parser.c (c_parser_postfix_expression): Parse
__builtin_convertvector.
cp/
* cp-tree.h (cp_build_vec_convert): Declare.
* parser.c (cp_parser_postfix_expression): Parse
__builtin_convertvector.
* constexpr.c: Include fold-const-call.h.
(cxx_eval_internal_function): Handle IFN_VEC_CONVERT.
(potential_constant_expression_1): Likewise.
* semantics.c (cp_build_vec_convert): New function.
* pt.c (tsubst_copy_and_build): Handle CALL_EXPR to
IFN_VEC_CONVERT.
testsuite/
* c-c++-common/builtin-convertvector-1.c: New test.
* c-c++-common/torture/builtin-convertvector-1.c: New test.
* g++.dg/ext/builtin-convertvector-1.C: New test.
* g++.dg/cpp0x/constexpr-builtin4.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@267632 138bc75d-0d04-0410-961f-82ee72b054a4
22 files changed:
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/c/ChangeLog
gcc/c/c-parser.c
gcc/cp/ChangeLog
gcc/cp/constexpr.c
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/doc/extend.texi
gcc/fold-const-call.c
gcc/internal-fn.c
gcc/internal-fn.def
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/builtin-convertvector-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/torture/builtin-convertvector-1.c [new file with mode: 0644]
gcc/testsuite/g++.dg/cpp0x/constexpr-builtin4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/builtin-convertvector-1.C [new file with mode: 0644]
gcc/tree-vect-generic.c