aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2019-12-06* cfgexpand.c (expand_debug_expr): Do not ICE on SAD_EXPR.Jan Hubicka2-0/+5
From-SVN: r279035
2019-12-06genmatch.c (c_expr::gen_transform): Emit newlines from line number changes ↵Richard Biener2-1/+18
rather than after every semicolon. 2019-12-06 Richard Biener <rguenther@suse.de> * genmatch.c (c_expr::gen_transform): Emit newlines from line number changes rather than after every semicolon. From-SVN: r279034
2019-12-06re PR tree-optimization/92819 (Worse code generated on avx2 due to ↵Richard Biener5-6/+48
simplify_vector_constructor) 2019-12-06 Richard Biener <rguenther@suse.de> PR tree-optimization/92819 * match.pd (VEC_PERM_EXPR -> BIT_INSERT_EXPR): Handle inserts into the last lane. For two-element vectors try inserting into the last lane when inserting into the first fails. * gcc.target/i386/pr92819-1.c: New testcase. * gcc.target/i386/pr92803.c: Adjust. From-SVN: r279033
2019-12-06re PR go/92810 (Compiling GCC go for aarch64_be-marvell-linux-gnu fails)Ian Lance Taylor3-1/+7
PR go/92810 libgo: recognize aarch64_be as arm64be Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210038 From-SVN: r279032
2019-12-05PR testsuite/92829 - several test case failures starting with r278983Martin Sebor2-2/+10
gcc/testsuite/ChangeLog: * gcc.dg/Warray-bounds-56.c: Rearrange code to avoid powerpc64* failures. From-SVN: r279031
2019-12-06common.opt (fprofile-partial-training): Terminate description with full stop.Jakub Jelinek2-1/+6
* common.opt (fprofile-partial-training): Terminate description with full stop. From-SVN: r279030
2019-12-05PR middle-end/92622 - FAIL: gcc.dg/Warray-bounds-22.c on ILP32: missing ↵Martin Sebor2-15/+23
warnings for VLA on lines 67 and 69 gcc/ChangeLog: PR middle-end/92622 * tree-vrp.c (vrp_prop::check_array_ref): Avoid using a variable left uninitialized by get_addr_base_and_unit_offset ofn failure. From-SVN: r279029
2019-12-06Daily bump.GCC Administrator1-1/+1
From-SVN: r279028
2019-12-06Do not clear m_vr and bits in ipa_set_jf_unknown.Jan Hubicka2-16/+16
* ipa-prop.c (ipa_set_jf_unknown): Do not clear bits and m_vr. (detect_type_change_from_memory_writes): Remoe parameter JFUNC. (detect_type_change): Likewise. (detect_type_change_ssa): Likewise. (ipa_analyze_virtual_call_uses): Update. From-SVN: r279025
2019-12-06re PR tree-optimization/92768 (Maybe a wrong code for vector constants)Jakub Jelinek2-1/+7
PR tree-optimization/92768 * gcc.dg/pr92768.c: Add -w -Wno-psabi to dg-options. From-SVN: r279024
2019-12-05Disable --eh-frame-hdr with -pie or -shared on nios2-linux-gnu.Sandra Loosemore5-0/+63
2019-12-05 Sandra Loosemore <sandra@codesourcery.com> Disable --eh-frame-hdr with -pie or -shared on nios2-linux-gnu. The nios2 ABI doesn't have appropriate relocations to support --eh-frame-hdr with -pie or -shared, so we need to override the default specs that add that link option. Otherwise we get linker warnings about invalid FDE encodings. gcc/ * config/nios2/linux.h (LINK_EH_SPEC): Define. gcc/testsuite/ * g++.target/nios2/hello-pie.C: New. * g++.target/nios2/nios2.exp: New. From-SVN: r279023
2019-12-05Fix g++.dg/torture/pr59226.CJan Hubicka2-1/+6
this patch fixes ICE in g++.dg/torture/pr59226.C which was triggered by new comdat_local sanity check. What happens here is that function gets inlined into its own thunk which makes it !comdat_local_p but the updating code does not notice since thunk calls comdat local alias of the function itself and we look at alias target rather than original callee. This also shows that we miss optimization here. Currently we will not inline thunk out of its comdat local group w/o inlining function it is associated with into it. We should teach inline_call to reoslve edges to aliases while inlining and relax calls_comdat_local flag. But this needs bit more work, so I fix the ICE first. * ipa-inline-transform.c (inline_call): Fix maintenatnce of comdat_local From-SVN: r279021
2019-12-05PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.Marek Polacek41-57/+666
This patch implements C++20 P1331, allowing trivial default initialization in constexpr contexts. * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr. * class.c (trivial_default_constructor_is_constexpr): Return true in C++20. * constexpr.c (cx_check_missing_mem_inits): Allow missing field initializers in C++20. (cxx_eval_call_expression): Don't clear CONSTRUCTOR_NO_CLEARING for constexpr constructors in C++20. (reduced_constant_expression_p): Don't set FIELD for union and array types. Skip empty class fields without initializers. * decl.c (check_for_uninitialized_const_var): Permit trivial default initialization in constexpr. (next_initializable_field): Don't skip vptr fields. * method.c (walk_field_subobs): Still consider a constructor that doesn't initialize all the members constexpr. * g++.dg/cpp0x/constexpr-array6.C: Adjust dg-error. * g++.dg/cpp0x/constexpr-ctor.C: Likewise. * g++.dg/cpp0x/constexpr-diag3.C: Likewise. * g++.dg/cpp0x/constexpr-diag4.C: Likewise. * g++.dg/cpp0x/constexpr-ex3.C: Likewise. * g++.dg/cpp0x/constexpr-template2.C: Likewise. * g++.dg/cpp0x/constexpr-union2.C: Likewise. * g++.dg/cpp0x/lambda/lambda-mangle.C: Rip out a piece of code ... * g++.dg/cpp0x/lambda/lambda-mangle6.C: ... and put it here. * g++.dg/cpp0x/pr79118.C: Adjust dg-error. * g++.dg/cpp1y/constexpr-83921-3.C: Likewise. * g++.dg/cpp1y/constexpr-neg1.C: Likewise. * g++.dg/cpp1z/constexpr-lambda12.C: Likewise. * g++.dg/cpp1z/feat-cxx1z.C: Use -std=c++17. * g++.dg/cpp2a/constexpr-init1.C: New test. * g++.dg/cpp2a/constexpr-init2.C: New test. * g++.dg/cpp2a/constexpr-init3.C: New test. * g++.dg/cpp2a/constexpr-init4.C: New test. * g++.dg/cpp2a/constexpr-init5.C: New test. * g++.dg/cpp2a/constexpr-init6.C: New test. * g++.dg/cpp2a/constexpr-init7.C: New test. * g++.dg/cpp2a/constexpr-init8.C: New test. * g++.dg/cpp2a/constexpr-init9.C: New test. * g++.dg/cpp2a/constexpr-init10.C: New test. * g++.dg/cpp2a/constexpr-init11.C: New test. * g++.dg/cpp2a/constexpr-init12.C: New test. * g++.dg/cpp2a/constexpr-init13.C: New test. * g++.dg/cpp2a/constexpr-init14.C: New test. * g++.dg/cpp2a/constexpr-init15.C: New test. * g++.dg/cpp2a/constexpr-try5.C: Adjust dg-error. * g++.dg/cpp2a/feat-cxx2a.C: Test __cpp_constexpr. * g++.dg/cpp2a/lambda-mangle.C: New test. * g++.dg/debug/dwarf2/pr44641.C: Skip for c++2a. * g++.dg/ext/stmtexpr21.C: Adjust dg-error. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r279019
2019-12-05PR c++/92271 - make __is_same alias for __is_same_as.Marek Polacek6-1/+23
Richard Smith proposed adding a synonym for __is_same_as, to accomodate the convention of exposing std::SOME_TRAIT<A, B>::value as __SOME_TRAIT(A, B). So add that alias, and also adjust the C++ printer. I didn't bother changing the RID_ identifier. * c-common.c: Add __is_same, an alias for __is_same_as. * cxx-pretty-print.c (pp_cxx_trait_expression) <case CPTK_IS_SAME_AS>: Print "__is_same". * g++.dg/ext/is_same.C: New test. From-SVN: r279018
2019-12-05cgraphclones.c (localize_profile): New function.Jan Hubicka7-9/+94
* cgraphclones.c (localize_profile): New function. (cgraph_node::create_clone): Use it for partial profiles. * common.opt (fprofile-partial-training): New flag. * doc/invoke.texi (-fprofile-partial-training): Document. * ipa-cp.c (update_profiling_info): For partial profiles do not set function profile to zero. * profile.c (compute_branch_probabilities): With partial profile watch if edge count is zero and turn all probabilities to guessed. (compute_branch_probabilities): For partial profiles do not apply profile when entry count is zero. * tree-profile.c (tree_profiling): Only do value_profile_transformations when profile is read. From-SVN: r279013
2019-12-05[Patch, GCC] Fix a condition post r278611Sudakshina Das2-1/+6
gcc/ChangeLog 2019-12-05 Sudakshina Das <sudi.das@arm.com> * tree-vect-loop.c (vect_model_reduction_cost): Remove reduction_type check from if condition. From-SVN: r279012
2019-12-05re PR go/92820 (libgo.so.15 has executable stack)Ian Lance Taylor2-2/+3
PR go/92820 runtime: always mark assembly file as non-executable stack Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/210037 From-SVN: r279010
2019-12-05OpenMP] Fix use_device_… with absent optional argTobias Burnus6-28/+68
gcc/fortran/ * trans-openmp.c (gfc_omp_is_optional_argument, gfc_omp_check_optional_argument): Handle type(c_ptr),value which uses a hidden argument for the is-present check. gcc/ * omp-low.c (lower_omp_target): For use_device_ptr/use_derice_addr and Fortran's optional arguments, unconditionally add the is-present condition before the libgomp call. libgomp/ * testsuite/libgomp.fortran/use_device_ptr-optional-2.f90: Add 'type(c_ptr), value' test case. Conditionally map the per-value passed arguments. From-SVN: r279004
2019-12-05* cp-gimplify.c: Include memmodel.h.David Edelsohn2-0/+5
From-SVN: r279003
2019-12-05Check for bitwise identity when encoding VECTOR_CSTs (PR 92768)Richard Sandiford6-5/+35
This PR shows that we weren't checking for bitwise-identical values when trying to encode a VECTOR_CST, so -0.0 was treated the same as 0.0 for -fno-signed-zeros. The patch adds a new OEP flag to select that behaviour. 2019-12-05 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR middle-end/92768 * tree-core.h (OEP_BITWISE): New flag. * fold-const.c (operand_compare::operand_equal_p): Handle it. * tree-vector-builder.h (tree_vector_builder::equal_p): Pass it. gcc/testsuite/ PR middle-end/92768 * gcc.dg/pr92768.c: New test. From-SVN: r279002
2019-12-05libstdc++: Fix bug in std::span testJonathan Wakely2-2/+13
The previous commit fixed the std::span constructors from const arrays, revealing a bug in this test. * testsuite/23_containers/span/lwg3255.cc: Fix test. Constructing a span of non-const elements should not be possible from a const array or an array of const elements. From-SVN: r279001
2019-12-05libstdc++: Implement P1872R0 and P1394R0 for std::spanJeanHeyd "ThePhD" Meneide5-227/+141
This also fixes a bug in the implementation of LWG 3255, which causes: FAIL: 23_containers/span/lwg3255.cc (test for excess errors) That's because the test was wrong and verified the buggy behaviour. That will be fixed in the following commit. 2019-12-05 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com> Implement P1872R0 and P1394R0 for std::span * include/bits/range_access.h (__adl_begin, __adl_end): Remove. (sentinel_t, range_value_t, range_reference_t) (range_rvalue_reference_t, __forwarding_range, disable_sized_range) (output_range, input_range, forward_range, bidirectional_range) (random_access_range, contiguous_range, common_range): Move here from <ranges>, to make this the "ranges lite" internal header. * include/std/ranges: Move basic aliases and concepts to <bits/range_access.h>. * include/std/span: Use concepts and ranges:: calls instead of enable_if and friends. * include/std/type_traits: Add __is_array_convertible trait. From-SVN: r279000
2019-12-05re PR tree-optimization/92818 (Typo in vec_perm -> bit_insert pattern)Richard Biener5-3/+32
2019-12-05 Richard Biener <rguenther@suse.de> PR middle-end/92818 * tree-ssa-forwprop.c (simplify_vector_constructor): Improve heuristics on what don't care element to choose. * match.pd (VEC_PERM_EXPR -> BIT_INSERT_EXPR): Fix typo. * gcc.target/i386/pr92818.c: New testcase. From-SVN: r278998
2019-12-05libstdc++: Define std::lexicographical_compare_three_way for C++20Jonathan Wakely4-0/+302
* include/bits/stl_algobase.h (lexicographical_compare_three_way): Define for C++20. * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc: New test. * testsuite/25_algorithms/lexicographical_compare_three_way/ constexpr.cc: New test. From-SVN: r278996
2019-12-05Fix __gcov_exit fn prototype.Martin Liska2-2/+7
2019-12-05 Martin Liska <mliska@suse.cz> PR gcov-profile/92817 * coverage.c (build_gcov_exit_decl): Remove superfluous void_type_node. From-SVN: r278995
2019-12-05MSP430: Fix postinc addressing mode being used for dst op of CMP insnsJozef Lawrynowicz2-7/+19
2019-12-05 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.md (cbranch<mode>4): Use msp430_general_dst_nonv_operand instead of nonimmediate_operand for dest operand of CMP instruction. (cbranchpsi4_real): Likewise. (cbranchqi4_real): Likewise. (cbranchhi4_real): Likewise. (cbranchpsi4_reversed): Likewise. (cbranchqi4_reversed): Likewise. (cbranchhi4_reversed): Likewise. From-SVN: r278994
2019-12-05Skip test gcc/testsuite/gcc.dg/asm-4.c for amdgcn targetFrederik Harwath2-0/+5
2019-12-05 Frederik Harwath <frederik@codesourcery.com> gcc/testsuite/ * gcc.dg/asm-4.c: Skip on target amdgcn-*-*. From-SVN: r278993
2019-12-05re PR target/92055 ([avr] Support 64-bit double)Georg-Johann Lay2-2/+7
PR target/92055 * config/avr/t-avrlibc (MULTISUBDIR): Search for double, not double64. From-SVN: r278992
2019-12-05re PR tree-optimization/92803 (error: type mismatch in 'vec_perm_expr' since ↵Richard Biener4-7/+60
r278764) 2019-12-05 Richard Biener <rguenther@suse.de> PR tree-optimization/92803 * tree-ssa-forwprop.c (simplify_vector_constructor): Fix invariant vector construction. * gcc.target/i386/pr92803.c: New testcase. From-SVN: r278991
2019-12-05Fix profile name files without -fprofile-dir.Martin Liska2-1/+7
2019-12-05 Martin Liska <mliska@suse.cz> PR gcov-profile/91971 * coverage.c (coverage_init): Mangle full path only when -fprofile-dir is used. From-SVN: r278990
2019-12-05re PR target/92791 (ICE in extract_insn, at recog.c:2311 since r278645)Jakub Jelinek2-2/+10
PR target/92791 * config/i386/i386.md (movstrict<mode>): Move test for TARGET_PARTIAL_REG_STALL and not optimizing for size from expander's condition to the body - FAIL; in that case. From-SVN: r278989
2019-12-05re PR fortran/92781 (ICE in convert_nonlocal_reference_op, at ↵Jakub Jelinek4-4/+30
tree-nested.c:1065) PR fortran/92781 * trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is current_function_decl, add length to current rather than parent function and expect DECL_CONTEXT (length) to be current_function_decl. * gfortran.dg/pr92781.f90: New test. From-SVN: r278988
2019-12-05typeck2.c (build_functional_cast): Add location_t parameter and use it.Paolo Carlini20-31/+76
/gcc/cp 2019-12-05 Paolo Carlini <paolo.carlini@oracle.com> * typeck2.c (build_functional_cast): Add location_t parameter and use it. * cp-tree.h: Update declaration. * parser.c (cp_parser_functional_cast): Adjust call. * call.c (build_op_delete_call): Likewise. (build_new_method_call_1): Likewise. * decl.c (check_initializer): Likewise. * pt.c (tsubst_copy_and_build): Likewise. * semantics.c (finish_compound_literal): Likewise. /libcc1 2019-12-05 Paolo Carlini <paolo.carlini@oracle.com> * libcp1plugin.cc (plugin_build_expression_list_expr): Adjust build_functional_cast call. /testsuite 2019-12-05 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/functional-cast-to-array-type-1.C: New. * g++.dg/cpp0x/auto25.C: Check location(s) too. * g++.dg/cpp0x/auto28.C: Likewise. * g++.dg/init/reference2.C: Likewise. * g++.dg/parse/template2.C: Likewise. * g++.dg/template/error8.C: Likewise. * g++.old-deja/g++.ns/crash3.C: Likewise. * g++.old-deja/g++.ns/template7.C: Likewise. * g++.old-deja/g++.pt/crash8.C: Likewise. From-SVN: r278987
2019-12-05testsuite/libgomp.oacc-fortran: Update dg-output to fix GCNTobias Burnus6-11/+33
* testsuite/libgomp.oacc-fortran/error_stop-1.f: Also don't expect dg-output of 'Error termination.' for GCN. * testsuite/libgomp.oacc-fortran/error_stop-2.f: Likewise. * testsuite/libgomp.oacc-fortran/error_stop-3.f: Likewise. Plus: Fix date of a previous commit in: * gcc/fortran/ChangeLog * gcc/testsuite/ChangeLog From-SVN: r278986
2019-12-05* edtest.c (test1): Add noclone attribute.Ian Lance Taylor2-2/+5
From-SVN: r278985
2019-12-05libbacktrace: simplify DWARF section handlingIan Lance Taylor6-208/+183
This is in preparation for adding DWARF 5 support. * internal.h (enum dwarf_section): Define. (struct dwarf_sections): Define. (backtrace_dwarf_add): Update declaration to replace specific section parameters with dwarf_sections parameter. * dwarf.c (struct dwarf_data): Replace specific section fields with dwarf_sections field. (read_attribute): Use dwarf_sections with altlink. (build_address_map): Replace specific section parameters with dwarf_sections parameter. Change all callers. (read_line_info): Use dwarf_sections with ddata. (read_referenced_name): Likewise. (add_function_ranges): Likewise. (read_function_entry): Likewise. (read_function_info): Likewise. (build_dwarf_data): Replace specific section parameters with dwarf_sections parameter. Change all callers. (backtrace_dwarf_add): Likewise. * elf.c (enum debug_section): Remove. (dwarf_section_names): Remove .zdebug names. (elf_add): Track zsections separately. Build dwarf_sections. * pecoff.c (enum debug_section): Remove. (struct debug_section_info): Remove data field. (coff_add): Build dwarf_sections. * xcoff.c (enum dwarf_section): Remove. Replace DWSECT_xxx references with DEBUG_xxx references. (xcoff_add): Build dwarf_sections. From-SVN: r278984
2019-12-04PR middle-end/91582 - missing heap overflow detection for strcpyMartin Sebor17-40/+895
gcc/ChangeLog: PR middle-end/91582 * builtins.c (gimple_call_alloc_size): New function. (compute_objsize): Add argument. Call gimple_call_alloc_size. Handle variable offsets and indices. * builtins.h (gimple_call_alloc_size): Declare. (compute_objsize): Add argument. * gcc/gimple-ssa-warn-restrict.c: Remove assertions. * tree-ssa-strlen.c (handle_store): Handle calls to allocated objects. gcc/testsuite/ChangeLog: PR middle-end/91582 * c-c++-common/Wstringop-truncation.c: Remove xfails. * g++.dg/warn/Wstringop-overflow-4.C: New test. * g++.dg/ext/attr-alloc_size.C: Suppress -Warray-bounds. * gcc.dg/Warray-bounds-56.c: New test. * gcc.dg/Wstringop-overflow-22.c: New test. * gcc.dg/attr-alloc_size.c: Suppress -Warray-bounds. * gcc.dg/attr-copy-2.c: Same. * gcc.dg/builtin-stringop-chk-5.c: Remove xfails. * gcc.dg/builtin-stringop-chk-8.c: Same. Correct the text of expected warnings. * gcc.target/i386/pr82002-2a.c: Prune expected warning. * gcc.target/i386/pr82002-2b.c: Same. From-SVN: r278983
2019-12-05libstdc++: Define pretty printer for comparison categoriesJonathan Wakely3-0/+83
* python/libstdcxx/v6/printers.py (StdCmpCatPrinter): New printer. * testsuite/libstdc++-prettyprinters/cxx20.cc: New test. From-SVN: r278982
2019-12-05libstdc++: Implement spaceship for std::array (P1614R2)Jonathan Wakely5-3/+62
As done for std::pair, this defines operator<=> as a non-member function template and does not alter operator==, as expected to be proposed as the resolution to an unpublished LWG issue. Instead of calling std::lexicographical_compare_three_way the <=> overload is implemented by hand to take advantage of the fact the element types and array sizes are known to be the same. * include/bits/cpp_type_traits.h (__is_byte<char8_t>): Add specialization. * include/std/array (operator<=>): Likewise. * testsuite/23_containers/array/comparison_operators/constexpr.cc: Test three-way comparisons and arrays of unsigned char. * testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust dg-error line numbers. From-SVN: r278981
2019-12-05Daily bump.GCC Administrator1-1/+1
From-SVN: r278980
2019-12-04Fix C handling of use of lvalues of incomplete types (PR c/36941, PR c/88827).Joseph Myers14-35/+146
Bug 88827 points out that GCC should not be rejecting C code that dereferences a pointer to an incomplete type in the case that uses &* to take the address of the resulting lvalue, because no constraint is violated in that case (other than for C90 when the incomplete type is unqualified void, which we already handle correctly) and as the lvalue never gets converted to an rvalue there is no undefined behavior either. This means that the diagnostic for such a dereference is bogus and should be removed; if the lvalue gets converted to an rvalue, there should be an appropriate error later for the use of the incomplete type. In most cases, there is, but bug 36941 points out the lack of a diagnostic when the incomplete (non-void) type gets cast to void (where a diagnostic seems appropriate for this undefined behavior as a matter of quality of implementation). This patch removes the bogus diagnostic (and C_TYPE_ERROR_REPORTED which was only used in the code that is removed - only that one, bogus diagnostic had this duplicate suppression, not any of the other, more legitimate diagnostics for use of incomplete types) and makes convert_lvalue_to_rvalue call require_complete_type for arguments not of void types, so that all relevant code paths (possibly except some for ObjC) get incomplete types diagnosed. It's possible that this makes some other checks for incomplete types obsolete, but no attempt is made to remove any such checks. Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/36941 PR c/88827 gcc/c: * c-typeck.c (convert_lvalue_to_rvalue): Call require_complete_type for arguments not of void types. (build_indirect_ref): Do not diagnose dereferencing pointers to incomplete types. * c-tree.h (C_TYPE_ERROR_REPORTED): Remove. gcc/testsuite: * gcc.dg/lvalue-9.c, gcc.dg/lvalue-10.c: New tests. * gcc.dg/array-8.c, gcc.dg/enum-incomplete-1.c, gcc.dg/enum-incomplete-3.c, gcc.dg/noncompile/incomplete-3.c, gcc.dg/pr48552-1.c, gcc.dg/pr48552-2.c, gcc.dg/pr63543.c, gcc.dg/pr69796.c: Update expected diagnostics. From-SVN: r278976
2019-12-04* cp-gimplify.c: Include tm_p.h.David Edelsohn2-0/+5
From-SVN: r278975
2019-12-04Use fixed registers for queue ptr sgpr pairJulian Brown2-1/+5
gcc/ * config/gcn/gcn.h (FIXED_REGISTERS): Make s6/s7 fixed registers. From-SVN: r278974
2019-12-04Do not define builtins that overload disabled builtins.Peter Bergner4-5222/+5247
PR bootstrap/92661 * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Move to rs6000.h. (altivec_overloaded_builtins): Move to rs6000-call.c. * config/rs6000/rs6000.h (struct altivec_builtin_types): Moved from rs6000-c.c. * config/rs6000/rs6000-call.c (rs6000_builtin_info): Make static. (altivec_overloaded_builtins): Moved from rs6000-c.c. (rs6000_common_init_builtins): Do no define builtins that overload builtins that have been disabled. From-SVN: r278973
2019-12-04[ARM] Improve max_cond_insns setting for Cortex coresWilco Dijkstra2-0/+10
To enable cores to use the correct max_cond_insns setting, use the core-specific tuning when a CPU/tune is selected unless -mrestrict-it is explicitly set. On Cortex-A57 this gives 1.1% performance gain on SPECINT2006 as well as a 0.4% codesize reduction. gcc/ * config/arm/arm.c (arm_option_override_internal): Use max_cond_insns from CPU tuning unless -mrestrict-it is used. From-SVN: r278968
2019-12-04Remove stray comma in primary_constraint_error.Marek Polacek2-1/+5
* parser.c (enum primary_constraint_error): Remove stray comma. From-SVN: r278967
2019-12-04[AArch64] Add support for fused compare and branchWilco Dijkstra3-7/+28
Add support for fused compare with branch. Rename the existing AARCH64_FUSE_CMP_BRANCH to ALU_BRANCH, and AARCH64_FUSE_ALU_BRANCH to ALU_CBZ to make it clear what is being fused. gcc/ * config/aarch64/aarch64.c (thunderxt88_tunings): Use AARCH64_FUSE_ALU_BRANCH. (thunderx_tunings): Likewise. (tsv110_tunings): Use AARCH64_FUSE_ALU_BRANCH and AARCH64_FUSE_ALU_CBZ. (thunderx2t99_tunings): Likewise. (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_CMP_BRANCH. * config/aarch64/aarch64-fusion-pairs.def: Add ALU_CBZ fusion. From-SVN: r278966
2019-12-04tree-ssa-sccvn.c (vn_reference_lookup_3): Properly guard empty CTOR and ↵Richard Biener2-2/+17
memset partial-def registering. 2019-12-04 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly guard empty CTOR and memset partial-def registering. Take advantage of fancy offset analysis in memset handling. From-SVN: r278965
2019-12-04Fix VIEW_CONVERT_EXPRs for VECTOR_BOOLEAN_TYPE_PsRichard Sandiford4-69/+271
In r278410 I added code to handle VIEW_CONVERT_EXPRs between variable-length vectors. This included support for decoding a VECTOR_BOOLEAN_TYPE_P with subbyte elements. However, it turns out that we were already mishandling such bool vectors for fixed-length vectors: we treated each element as a stand-alone byte instead of putting multiple elements into the same byte. I think in principle this could have been an issue for AVX512 as well. This patch adds encoding support for boolean vectors and reuses a version of the new decode support for fixed-length vectors. 2019-12-04 Richard Sandiford <richard.sandiford@arm.com> gcc/ * fold-const.c (native_encode_vector_part): Handle VECTOR_BOOLEAN_TYPE_Ps that have subbyte precision. (native_decode_vector_tree): Delete, moving the bulk of the code to... (native_interpret_vector_part): ...this new function. Use a pointer and length instead of a vec<> and start index. (native_interpret_vector): Use native_interpret_vector_part. (fold_view_convert_vector_encoding): Likewise. gcc/testsuite/ * gcc.target/aarch64/sve/acle/general/whilelt_5.c: New test. From-SVN: r278964
2019-12-04tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Handle non-constant ↵Richard Biener4-32/+84
defs in the most trivial way. 2019-12-04 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Handle non-constant defs in the most trivial way. (vn_reference_lookup_3): Also push down SSA partial defs. * gcc.dg/tree-ssa/ssa-fre-84.c: New testcase. From-SVN: r278963