- 19 Jul, 2019 4 commits
-
-
2019-07-19 Richard Biener <rguenther@suse.de> PR tree-optimization/91207 Revert 2019-07-17 Richard Biener <rguenther@suse.de> PR tree-optimization/91178 * tree-vect-stmts.c (get_group_load_store_type): For SLP loads with a gap larger than the vector size always use VMAT_STRIDED_SLP. (vectorizable_load): For VMAT_STRIDED_SLP with a permutation avoid loading vectors that are only contained in the gap and thus are not needed. * gcc.dg/torture/pr91207.c: New testcase. From-SVN: r273593
Richard Biener committed -
We shouldn't complain that a dependent type is incomplete. * pt.c (invalid_nontype_parm_type_p): Check for dependent class type. From-SVN: r273592
Jason Merrill committed -
A non-type template parameter of class type used in an expression has const-qualified type; the pt.c hunks deal with this difference from the unqualified type of the parameter declaration. WAhen we use such a parameter as an argument to another template, we don't want to confuse things by copying it, we should pass it straight through. And we might as well skip copying other classes in constant evaluation context in a template, too; we'll get the copy semantics at instantiation time. PR c++/90099 PR c++/90101 * call.c (build_converted_constant_expr_internal): Don't copy. * pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR around class non-type parameter. (unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals. From-SVN: r273591
Jason Merrill committed -
From-SVN: r273590
GCC Administrator committed
-
- 18 Jul, 2019 20 commits
-
-
2019-07-18 François Dumont <fdumont@gcc.gnu.org> * include/bits/stl_tempbuf.h (__detail::__return_temporary_buffer): New. (~_Temporary_buffer()): Use latter. (_Temporary_buffer(_FIterator, size_type)): Likewise. From-SVN: r273586
François Dumont committed -
* config/i386/i386.md (*addqi_2_slp): Remove. (*<code>qi_2_slp): Ditto. From-SVN: r273583
Uros Bizjak committed -
2019-07-18 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/predicates.md (prefixed_mem_operand): Call rs6000_prefixed_address_mode_p instead of rs6000_prefixed_address. * config/rs6000/rs6000-protos.h (rs6000_prefixed_address_mode_p): Rename function from rs6000_prefixed_address. * config/rs6000/rs6000.c (rs6000_prefixed_address_mode_p): Rename function from rs6000_prefixed_address. From-SVN: r273580
Michael Meissner committed -
2019-07-18 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/aix.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. * config/rs6000/darwin.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. * config/rs6000/linux64.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. * config/rs6000/rs6000.c (rs6000_option_override_internal): Add check to require -mcmodel=medium for pc-relative addressing. (create_TOC_reference): Add assertion for TARGET_TOC. (rs6000_legitimize_address): Use TARGET_NO_TOC_OR_PCREL instead of TARGET_NO_TOC. (rs6000_emit_move): Likewise. (TOC_alias_set): Rename TOC alias set static variable from 'set' to 'TOC_alias_set'. (get_TOC_alias_set): Likewise. (output_toc): Use TARGET_NO_TOC_OR_PCREL instead of TARGET_NO_TOC. (rs6000_can_eliminate): Likewise. * config/rs6000/rs6000.h (TARGET_TOC): Define in terms of TARGET_HAS_TOC and not pc-relative. (TARGET_NO_TOC_OR_PCREL): New macro to replace TARGET_NO_TOC. * config/rs6000/sysv4.h (TARGET_HAS_TOC): Rename TARGET_TOC to TARGET_HAS_TOC. (TARGET_TOC): Likewise. (TARGET_NO_TOC): Delete here, define TARGET_NO_TOC_OR_PCREL in rs6000.h. From-SVN: r273579
Michael Meissner committed -
PR target/91188 * config/i386/i386.md (*addqi_1_slp): Use register_operand predicate for operand 0. Do not use (match_dup) to match operand 1 with operand 0. Add check in insn constraint that either input operand matches operand 0. Use SWI12 mode iterator to also handle HImode operands. (*and<mode>_1_slp): Ditto. (*<code>qi_1_slp): Ditto. (*sub<mode>_1_slp): Use register_operand predicate for operand 0. Do not use (match_dup) to match operand 1 with operand 0. Add check in insn constraint that operand 1 matches operand 0. Use SWI12 mode iterator to also handle HImode operands. (*ashl<mode>3_1_slp): Ditto. (*<shift_insn><mode>3_1_slp): Ditto. (*<rotate_insn><mode>3_1_slp): Ditto. testsuite/ChangeLog: PR target/91188 * gcc.target/i386/pr91188-1a.c: New test. * gcc.target/i386/pr91188-1b.c: Ditto. * gcc.target/i386/pr91188-1c.c: Ditto. * gcc.target/i386/pr91188-2a.c: Ditto. * gcc.target/i386/pr91188-2b.c: Ditto. * gcc.target/i386/pr91188-2c.c: Ditto. From-SVN: r273578
Uros Bizjak committed -
This patch fixes a buglet in the function body importer. Add hooks for keeping a stack of blocks corresponding to the block nesting in the imported function. This ensures that local variables and temps wind up correctly scoped and don't introduce collisions. New test case for this problem in CL 186717. Fixes golang/go#33158. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/186757 From-SVN: r273577
Ian Lance Taylor committed -
Makefile.rtl, [...]: Introduce a "STANDALONE" mode where C runtime files do not have any dependency... * Makefile.rtl, expect.c, env.c, aux-io.c, mkdir.c, initialize.c, cstreams.c, raise.c, tracebak.c, adadecode.c, init.c, raise-gcc.c, argv.c, adaint.c, adaint.h, ctrl_c.c, sysdep.c, rtinit.c, cio.c, seh_init.c, exit.c, targext.c: Introduce a "STANDALONE" mode where C runtime files do not have any dependency on GCC include files. Remove unnecessary includes. Remove remaining references to VMS in runtime C file. * runtime.h: new File. From-SVN: r273576
Arnaud Charlet committed -
This patch removes the builtin expand handling for sha1h/c/m/p and replaces it with expand patterns. This should make it more consistent with how we handle intrinsic implementations and cleans up the custom sha1 code in the arm_expand builtins for unop and ternop. 2019-07-18 Sylvia Taylor <sylvia.taylor@arm.com> * config/arm/arm-builtins.c (arm_expand_ternop_builtin): Remove explicit sha1 builtin handling. (arm_expand_unop_builtin): Likewise. * config/arm/crypto.md (crypto_sha1h): Convert from define_insn to define_expand. (crypto_<crypto_pattern>): Likewise. (crypto_sha1h_lb): New define_insn. (crypto_<crypto_pattern>_lb): Likewise. From-SVN: r273575
Sylvia Taylor committed -
This patch fixes: 1) Ice message thrown when using the crypto_sha1h intrinsic due to incompatible mode used for zero_extend. Removed zero extend as it is not a good choice for vector modes and using an equivalent single mode like TI (128bits) instead of V4SI produces extra instructions making it inefficient. This affects gcc version 8 and above. 2) Incorrect combine optimizations made due to vec_select usage in the sha1 patterns on arm. The patterns should only combine a vec select within a sha1h<op> instruction when the lane is 0. This affects gcc version 5 and above. - Fixed by explicitly declaring the valid const int for such optimizations. For cases when the lane is not 0, the vector lane selection now occurs in a e.g. vmov instruction prior to sha1h<op>. - Updated the sha1h testcases on arm to check for additional cases with custom vector lane selection. The intrinsic functions for the sha1 patterns have also been simplified which seems to eliminate extra vmovs like: - vmov.i32 q8, #0. 2019-07-18 Sylvia Taylor <sylvia.taylor@arm.com> PR target/90317 * config/arm/arm_neon.h (vsha1h_u32): Refactor. (vsha1cq_u32): Likewise. (vsha1pq_u32): Likewise. (vsha1mq_u32): Likewise. * config/arm/crypto.md: (crypto_sha1h): Remove zero extend, correct vec select. (crypto_sha1c): Correct vec select. (crypto_sha1m): Likewise. (crypto_sha1p): Likewise. * gcc.target/arm/crypto-vsha1cq_u32.c (foo): Change return type to uint32_t. (GET_LANE, TEST_SHA1C_VEC_SELECT): New. * gcc.target/arm/crypto-vsha1h_u32.c (foo): Change return type to uint32_t. (GET_LANE, TEST_SHA1H_VEC_SELECT): New. * gcc.target/arm/crypto-vsha1mq_u32.c (foo): Change return type to uint32_t. (GET_LANE, TEST_SHA1M_VEC_SELECT): New. * gcc.target/arm/crypto-vsha1pq_u32.c (foo): Change return type to uint32_t. (GET_LANE, TEST_SHA1P_VEC_SELECT): New. From-SVN: r273574
Sylvia Taylor committed -
include/ * demangle.h (rust_is_mangled): Move to libiberty/rust-demangle.h. (rust_demangle_sym): Move to libiberty/rust-demangle.h. libiberty/ * cplus-dem.c: Include rust-demangle.h. * rust-demangle.c: Include rust-demangle.h. * rust-demangle.h: New file. From-SVN: r273573
Eduard-Mihai Burtescu committed -
Looking through the arm backend I noticed that the modes used to pass comparison types into subtract-with-carry operations were being incorrectly set. The result is that the compiler is not truly self-consistent. To clean this up I've introduced a new predicate, arm_borrow_operation (borrowed from the AArch64 backend) which can match the comparison type with the required mode and then fixed all the patterns to use this. The split patterns that were generating incorrect modes have all obviously been fixed as well. The basic rule for the use of a borrow is: - if the condition code was set by a 'subtract-like' operation (subs, cmp), then use CCmode and LTU. - if the condition code was by unsigned overflow of addition (adds), then use CC_Cmode and GEU. * config/arm/predicates.md (arm_borrow_operation): New predicate. * config/arm/arm.c (subdi3_compare1): Use CCmode for the split. (arm_subdi3, subdi_di_zesidi, subdi_di_sesidi): Likewise. (subdi_zesidi_zesidi): Likewise. (negdi2_compare, negdi2_insn): Likewise. (negdi_extensidi): Likewise. (negdi_zero_extendsidi): Likewise. (arm_cmpdi_insn): Likewise. (subsi3_carryin): Use arm_borrow_operation. (subsi3_carryin_const): Likewise. (subsi3_carryin_const0): Likewise. (subsi3_carryin_compare): Likewise. (subsi3_carryin_compare_const): Likewise. (subsi3_carryin_compare_const0): Likewise. (subsi3_carryin_shift): Likewise. (rsbsi3_carryin_shift): Likewise. (negsi2_carryin_compare): Likewise. From-SVN: r273572
Richard Earnshaw committed -
lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts of types in anonymous namespaces. * lto-common.c (gimple_register_canonical_type_1): Do not look for non-ODR conflicts of types in anonymous namespaces. (unify_scc): Do not merge anonymous namespace types. * g++.dg/lto/alias-5_0.C: New testcase. * g++.dg/lto/alias-5_1.C: New. * g++.dg/lto/alias-5_2.c: New. From-SVN: r273571
Jan Hubicka committed -
PR tree-optimization/91137 * tree-ssa-loop-ivopts.c (struct ivopts_data): New field. (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize): Init, use and fini the above new field. (determine_base_object_1): New function. (determine_base_object): Reimplement using walk_tree. gcc/testsuite PR tree-optimization/91137 * gcc.c-torture/execute/pr91137.c: New test. From-SVN: r273570
Bin Cheng committed -
This change is needed to avoid a regression in gcc.dg/ifcvt-3.c for a later patch. Without it, we enter CSE with a dead comparison left by if-conversion and then eliminate the second (live) comparison in favour of the dead one. That's functionally correct in itself, but it meant that we'd combine the subtraction and comparison into a SUBS before we have a chance to fold away the subtraction. 2019-07-18 Richard Sandiford <richard.sandiford@arm.com> gcc/ * basic-block.h (CLEANUP_FORCE_FAST_DCE): New macro. * cfgcleanup.c (cleanup_cfg): Call run_fast_dce if CLEANUP_FORCE_FAST_DCE is set. * ifcvt.c (rest_of_handle_if_conversion): Pass CLEANUP_FORCE_FAST_DCE to the final cleanup_cfg call if if-conversion succeeded. From-SVN: r273569
Richard Sandiford committed -
This patch extends the fix for PR53633 to include static functions, which were giving a bogus -Wreturn-type warning for C but not for C++. 2019-07-18 Richard Sandiford <richard.sandiford@arm.com> gcc/c/ PR c/53633 * c-decl.c (finish_function): Check targetm.warn_func_return before issuing a -Wreturn-type warning. gcc/testsuite/ * c-c++-common/pr53633-2.c: New test. From-SVN: r273568
Richard Sandiford committed -
2019-07-18 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (vn_walk_cb_data::push_partial_def): Refactor branches to make code less indented. From-SVN: r273567
Richard Biener committed -
In CL 183850 a change was made to combine tracking/discovery of exported types and imported packages during export data generation. As a result of this refactoring a bug was introduced: the new code can potentially insert items into the exports set (an unordered_set) while iterating through the same set, which is illegal according to the spec for std::unordered_set. This patch fixes the problem by changing the type discovery phase to iterate through a separate list of sorted exports, as opposed to iterating through the main unordered set. Also included is a change to fix the code that looks for variables that are referenced from inlined routine bodies (this code wasn't scanning all of the function that it needed to scan). New test case for this problem in CL 186697. Updates golang/go#33020. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/185977 From-SVN: r273564
Ian Lance Taylor committed -
The initial patch for PR 81824 fixed various possibilities of -Wmissing-attributes reporting duplicates and false positives. The test that avoided them was a little obscure, though, so this patch rewrites it into a more self-evident form. The patch also adds a testcase that already passed, but that explicitly covers some of the possibilities of reporting duplicates and false positives that preexisting tests did not cover. for gcc/ChangeLog PR middle-end/81824 * attribs.c (decls_mismatched_attributes): Simplify the logic that avoids duplicates and false positives. for gcc/testsuite/ChangeLog PR middle-end/81824 * g++.dg/Wmissing-attributes-1.C: New. Some of its fragments are from Martin Sebor. From-SVN: r273563
Alexandre Oliva committed -
From-SVN: r273562
GCC Administrator committed -
pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code. * config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code. (pa_select_section): Use pa_reloc_rw_mask() to qualify relocs. (pa_reloc_rw_mask): Return 3 when generating PIC code and when generating code for SOM targets earlier than HP-UX 11. Otherwise, return 2 for SOM and 0 for other targets. From-SVN: r273557
John David Anglin committed
-
- 17 Jul, 2019 14 commits
-
-
* tree-ssa-dse.c (initialize_ao_ref_for_dse): Fix formatting. (dse_walker::dse_optimize_stmt): Likewise. Add missing return to avoid unexpected switch statement fallthru. From-SVN: r273556
Jeff Law committed -
* config/i386/i386.md (*add<dwi>3_doubleword): Remove redundant constraints. (*add<mode>_1): Ditto. (*addhi_1): Ditto. (*addqi_1): Ditto. (*addqi_1_slp): Ditto. (*add<mode>_2): Ditto. (*addv<mode>4): Ditto. (*sub<dwi>3_doubleword): Ditto. (*sub<mode>_1): Ditto. (*subqi_1_slp): Ditto. (*sub<mode>_2): Ditto. (*subv<mode>4): Ditto. (*sub<mode>_3): Ditto. (@add<mode>3_carry): Ditto. (@sub<mode>3_carry): Ditto. (*add<mode>3_cc_overflow_1): Ditto. (*add<mode>3_zext_cc_overflow_2): Ditto. (*anddi_1): Ditto. (*and<mode>_1): Ditto. (*andqi_1): Ditto. (*andqi_1_slp): Ditto. (*anddi_2): Ditto. (*andqi_2_maybe_si): Ditto. (*and<mode>_2): Ditto. (*andqi_2_slp): Ditto. (*<code><mode>_1): Ditto. (*<code>qi_1): Ditto. (*<code>qi_1_slp): Ditto. (*<code><mode>_2): Ditto. (*<code>qi_2_slp): Ditto. From-SVN: r273554
Uros Bizjak committed -
PR c++/90455 * g++.dg/cpp0x/nsdmi-list6.C: New test. From-SVN: r273553
Marek Polacek committed -
* alias.c (record_component_aliases): Do not simplify pointed-to types of ODR types * testsuite/g++.dg/lto/alias-4_0.C From-SVN: r273552
Jan Hubicka committed -
* config/i386/i386.md (*andqi_2_maybe_si): Handle potential partial reg stall on alternative 2. From-SVN: r273551
Uros Bizjak committed -
2019-07-17 Richard Biener <rguenther@suse.de> PR tree-optimization/91178 * tree-ssa.c (release_defs_bitset): Iterate from higher to lower SSA names to avoid quadratic behavior in the common case. * tree-data-ref.c (split_constant_offset): Add limit argument and pass it down. Initialize it from PARAM_SSA_NAME_DEF_CHAIN_LIMIT. (split_constant_offset_1): Add limit argument and use it to limit SSA def walking. Optimize the common plus/minus case. From-SVN: r273550
Richard Biener committed -
2019-07-17 Richard Biener <rguenther@suse.de> PR tree-optimization/91178 * tree-vect-stmts.c (get_group_load_store_type): For SLP loads with a gap larger than the vector size always use VMAT_STRIDED_SLP. (vectorizable_load): For VMAT_STRIDED_SLP with a permutation avoid loading vectors that are only contained in the gap and thus are not needed. * gcc.dg/torture/pr91178.c: New testcase. From-SVN: r273549
Richard Biener committed -
2019-07-17 Richard Biener <rguenther@suse.de> PR tree-optimization/91180 * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix offset computation for memset partial defs. * gcc.dg/torture/pr91180.c: New testcase. From-SVN: r273548
Richard Biener committed -
From-SVN: r273547
Andreas Schwab committed -
re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref')) PR tree-optimization/91157 * tree-vect-generic.c (expand_vector_comparison): Handle lhs being a vector boolean with scalar mode. (expand_vector_condition): Handle first operand being a vector boolean with scalar mode. (expand_vector_operations_1): For comparisons, don't bail out early if the return type is vector boolean with scalar mode, but comparison operand type is not. * gcc.target/i386/avx512f-pr91157.c: New test. * gcc.target/i386/avx512bw-pr91157.c: New test. From-SVN: r273545
Jakub Jelinek committed -
* gimple.h (enum gf_mask): Remove GF_OMP_FOR_SIMD, change GF_OMP_FOR_KIND_SIMD to a value serially after other kinds, divide GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_COMBINED, GF_OMP_FOR_COMBINED_INTO, GF_OMP_FOR_GRID_PHONY, GF_OMP_FOR_GRID_INTRA_GROUP and GF_OMP_FOR_GRID_GROUP_ITER by two. * omp-grid.c (grid_process_grid_body, grid_eliminate_combined_simd_part): Use GF_OMP_FOR_KIND_SIMD instead of GF_OMP_FOR_SIMD, don't test & GF_OMP_FOR_SIMD but == GF_OMP_FOR_KIND_SIMD. * omp-low.c (build_outer_var_ref, scan_sharing_clauses, check_omp_nesting_restrictions, scan_omp_1_stmt, lower_rec_input_clauses, lower_lastprivate_conditional_clauses, lower_lastprivate_clauses, lower_reduction_clauses, lower_omp_scan, omp_find_scan): Likewise. * omp-expand.c (expand_omp_for): Likewise. * omp-general.c (omp_extract_for_data): Likewise. From-SVN: r273544
Jakub Jelinek committed -
re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref')) PR tree-optimization/91157 * tree-vect-generic.c (expand_vector_comparison): Handle lhs being a vector boolean with scalar mode. (expand_vector_condition): Handle first operand being a vector boolean with scalar mode. (expand_vector_operations_1): For comparisons, don't bail out early if the return type is vector boolean with scalar mode, but comparison operand type is not. * gcc.target/i386/avx512f-pr91157.c: New test. * gcc.target/i386/avx512bw-pr91157.c: New test. From-SVN: r273543
Jakub Jelinek committed -
2019-07-17 Richard Biener <rguenther@suse.de> PR tree-optimization/91181 * tree-vect-slp.c (vect_build_slp_tree_1): Do not compare IFN_LOADs as calls. * gcc.dg/pr91181.c: New testcase. From-SVN: r273542
Richard Biener committed -
From-SVN: r273541
GCC Administrator committed
-
- 16 Jul, 2019 2 commits
-
-
2019-07-16 Harald Anlauf <anlauf@gmx.de> PR fortran/90903 * libgfortran.h: Add mask for -fcheck=bits option. * options.c (gfc_handle_runtime_check_option): Add option "bits" to run-time checks selectable via -fcheck. * trans-intrinsic.c (gfc_conv_intrinsic_btest) (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits) (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft) (gfc_conv_intrinsic_ishftc): Implement run-time checks for the POS, LEN, SHIFT, and SIZE arguments. * gfortran.texi: Document run-time checks for bit manipulation intrinsics. * invoke.texi: Document new -fcheck=bits option. PR fortran/90903 * gfortran.dg/check_bits_1.f90: New testcase. From-SVN: r273535
Harald Anlauf committed -
* config/i386/i386.md (*testdi_1): Match CCZmode for constants that might have the SImode sign bit set. (*testqi_1_maybe_si): Remove "!" constraint modifier. Use correct constraints for pentium pairing. (*test<mode>_1): Ditto. From-SVN: r273534
Uros Bizjak committed
-