- Jun 14, 2021
-
-
GCC Administrator authored
-
- Jun 13, 2021
-
-
Uros Bizjak authored
Emit constant permutation insn directly from expand_vec_perm_shufb. 2021-06-13 Uroš Bizjak <ubizjak@gmail.com> gcc/ PR target/101021 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Emit constant permutation insn directly from here.
-
Jason Merrill authored
Another testcase update needed for my r12-1405 commit. gcc/testsuite/ChangeLog: * gcc.dg/c2x-attr-maybe_unused-1.c: Expect no warnings.
-
Trevor Saunders authored
This changes users of FOR_EACH_VEC_ELT to use range based for loops, where the index variables are otherwise unused. As such the index variables are all deleted, producing shorter and simpler code. Signed-off-by:
Trevor Saunders <tbsaunde@tbsaunde.org> gcc/analyzer/ChangeLog: * call-string.cc (call_string::call_string): Use range based for to iterate over vec<>. (call_string::to_json): Likewise. (call_string::hash): Likewise. (call_string::calc_recursion_depth): Likewise. * checker-path.cc (checker_path::fixup_locations): Likewise. * constraint-manager.cc (equiv_class::equiv_class): Likewise. (equiv_class::to_json): Likewise. (equiv_class::hash): Likewise. (constraint_manager::to_json): Likewise. * engine.cc (impl_region_model_context::on_svalue_leak): Likewise. (on_liveness_change): Likewise. (impl_region_model_context::on_unknown_change): Likewise. * program-state.cc (sm_state_map::set_state): Likewise. * region-model.cc (test_canonicalization_4): Likewise. gcc/ChangeLog: * attribs.c (find_attribute_namespace): Iterate over vec<> with range based for. * auto-profile.c (afdo_find_equiv_class): Likewise. * gcc.c (do_specs_vec): Likewise. (do_spec_1): Likewise. (driver::set_up_specs): Likewise. * gimple-loop-jam.c (any_access_function_variant_p): Likewise. * gimple-ssa-store-merging.c (compatible_load_p): Likewise. (imm_store_chain_info::try_coalesce_bswap): Likewise. (imm_store_chain_info::coalesce_immediate_stores): Likewise. (get_location_for_stmts): Likewise. * graphite-poly.c (print_iteration_domains): Likewise. (free_poly_bb): Likewise. (remove_gbbs_in_scop): Likewise. (free_scop): Likewise. (dump_gbb_cases): Likewise. (dump_gbb_conditions): Likewise. (print_pdrs): Likewise. (print_scop): Likewise. * ifcvt.c (cond_move_process_if_block): Likewise. * lower-subreg.c (decompose_multiword_subregs): Likewise. * regcprop.c (pass_cprop_hardreg::execute): Likewise. * sanopt.c (sanitize_rewrite_addressable_params): Likewise. * sel-sched-dump.c (dump_insn_vector): Likewise. * store-motion.c (store_ops_ok): Likewise. (store_killed_in_insn): Likewise. * timevar.c (timer::named_items::print): Likewise. * tree-cfgcleanup.c (cleanup_control_flow_pre): Likewise. (cleanup_tree_cfg_noloop): Likewise. * tree-data-ref.c (dump_data_references): Likewise. (print_dir_vectors): Likewise. (print_dist_vectors): Likewise. (dump_data_dependence_relations): Likewise. (dump_dist_dir_vectors): Likewise. (dump_ddrs): Likewise. (create_runtime_alias_checks): Likewise. (free_subscripts): Likewise. (save_dist_v): Likewise. (save_dir_v): Likewise. (invariant_access_functions): Likewise. (same_access_functions): Likewise. (access_functions_are_affine_or_constant_p): Likewise. (find_data_references_in_stmt): Likewise. (graphite_find_data_references_in_stmt): Likewise. (free_dependence_relations): Likewise. (free_data_refs): Likewise. * tree-inline.c (copy_debug_stmts): Likewise. * tree-into-ssa.c (dump_currdefs): Likewise. (rewrite_update_phi_arguments): Likewise. * tree-ssa-propagate.c (clean_up_loop_closed_phi): Likewise. * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr): Likewise. (vect_slp_analyze_node_dependences): Likewise. (vect_slp_analyze_instance_dependence): Likewise. (vect_record_base_alignments): Likewise. (vect_get_peeling_costs_all_drs): Likewise. (vect_peeling_supportable): Likewise. * tree-vectorizer.c (vec_info::~vec_info): Likewise. (vec_info::free_stmt_vec_infos): Likewise. gcc/cp/ChangeLog: * constexpr.c (cxx_eval_call_expression): Iterate over vec<> with range based for. (cxx_eval_store_expression): Likewise. (cxx_eval_loop_expr): Likewise. * decl.c (wrapup_namespace_globals): Likewise. (cp_finish_decl): Likewise. (cxx_simulate_enum_decl): Likewise. * parser.c (cp_parser_postfix_expression): Likewise.
-
Jeff Law authored
gcc/ * config/h8300/logical.md (<code>qi3_1<cczn>): New pattern. (andqi3_1<cczn>): Removed. (<ors>qi3_1): Do not split for IOR/XOR a single bit. (H8/SX bit logicals): Split out from other patterns. * config/h8300/multiply.md (mulqihi3_const<cczn>): Renamed from mulqihi3_const_clobber_flags. (mulqihi3<cczn>, mulhisi3_const<cczn>, mulhisi3<cczn>): Similarly
-
H.J. Lu authored
Add red_zone_used to machine_function to track if red zone is used. When expanding function prologue, set red_zone_used to true if red zone is used. gcc/ PR target/101023 * config/i386/i386.c (ix86_expand_prologue): Set red_zone_used to true if red zone is used. (ix86_output_indirect_jmp): Replace ix86_red_zone_size with ix86_red_zone_used. * config/i386/i386.h (machine_function): Add red_zone_used. (ix86_red_zone_size): Removed. (ix86_red_zone_used): New. * config/i386/i386.md (peephole2 patterns): Replace ix86_red_zone_size with ix86_red_zone_used. gcc/testsuite/ PR target/101023 * g++.target/i386/pr101023a.C: New test. * g++.target/i386/pr101023b.C: Likewise.
-
Tobias Burnus authored
This patch checks that a '[PRnnnn]' and '(PRnnnn)' also appears as PR in the changelog part of the commit message. And it does likewise for 'PR comp/nnnn' except that then also the component name is checked. (Note that the reverse is permitted, i.e. PR(s) only appearing in the changelog.) To avoid false positives, PR numbers in the subject line are ignored, if 'revert' appears. Additionally, reject commits with a nonempty second line. contrib/ChangeLog: * gcc-changelog/git_commit.py (pr_regex): Add ?P<pr> for group('pr'). (subject_pr_regex, subject_pr2_regex): New. (GitInfo.__init__, GitCommit.parse_changelog): Check subject PRs. * gcc-changelog/git_email.py (SUBJECT_PREFIX, subject_patch_regex): New. (GitEmail.__init__): Parse 'Subject:' and pass it to GitInfo. * gcc-changelog/test_email.py (test_pr_only_in_subject, test_wrong_pr_comp_in_subject, test_copyright_years): New. * gcc-changelog/test_patches.txt (0030-PR-c-92746, pr-check1.patch): Update to avoid triggering the new check. (0001-rs6000-Support-doubleword, pr-wrong-comp.patch, copyright-years.patch): New.
-
GCC Administrator authored
-
- Jun 12, 2021
-
-
David Edelsohn authored
* g++.dg/ext/builtin-shufflevector-2.C: Ignore psabi warning. * gcc.dg/uninit-pr93100.c: Skip on AIX. * gcc.target/powerpc/pr100085.c: Require int128 and float128.
-
Jason Merrill authored
The C++17 standard (and C2x) says that [[maybe_unused]] may be applied to a non-static data member, so we shouldn't warn about it. And I don't see a reason not to handle a FIELD_DECL the same as any other decl, by setting TREE_USED on it. It doesn't look like anything yet cares about that flag on a FIELD_DECL, but setting it shouldn't hurt. gcc/c-family/ChangeLog: * c-attribs.c (handle_unused_attribute): Handle FIELD_DECL. gcc/testsuite/ChangeLog: * g++.dg/ext/attrib62.C: No longer warn. * g++.dg/diagnostic/maybe_unused1.C: New test. gcc/ChangeLog: * doc/extend.texi (unused variable attribute): Applies to structure fields as well.
-
Jason Merrill authored
build_vec_init_elt exits early if we're initializing a zero-element array, so build_vec_init needs to do the same to avoid trying to instantiate things after we've already started throwing important bits away. PR c++/101029 gcc/cp/ChangeLog: * init.c (build_vec_init): Shortcut [0] case. gcc/testsuite/ChangeLog: * g++.dg/ext/array4.C: New test.
-
Jason Merrill authored
While looking at template instantiation tracing, I noticed that we were frequently looking up a particular class template instance while instantiating it. This patch shortcuts that lookup, and speeds up compiling stdc++.h with my (checking/unoptimized) compiler by about 3%. gcc/cp/ChangeLog: * pt.c (lookup_template_class_1): Shortcut current_class_type.
-
GCC Administrator authored
-
Eugene Rozenfeld authored
gcc/ChangeLog: * auto-profile.c (read_profile): fix a typo in an error string
-
- Jun 11, 2021
-
-
Carl Love authored
The effective target for a Power 9 runnable test should be p9vector_hw. 2021-06-11 Carl Love <cel@us.ibm.com> gcc/testsuite/ChangeLog * gcc.target/powerpc/check-builtin-vec_rlnm-runnable.c (dg-require-effective-target): Change target to p9vector_hw.
-
Thomas Schwinge authored
... instead of just the first clause. gcc/ * tree-pretty-print.h (dump_omp_clauses): Add 'bool = true' default argument. * tree-pretty-print.c (dump_omp_clauses): Update. (dump_generic_node) <OMP_CLAUSE>: Use it. gcc/testsuite/ * gcc.dg/gomp/simd-clones-2.c: Enhance.
-
Patrick Palka authored
This makes tsubst_arg_types substitute into a function's parameter types in left-to-right instead of right-to-left order, in accordance with DR 1227. DR 1227 PR c++/96560 gcc/cp/ChangeLog: * pt.c (tsubst_arg_types): Rearrange so that we substitute into TYPE_ARG_TYPES in forward order while short circuiting appropriately. Adjust formatting. gcc/testsuite/ChangeLog: * g++.dg/template/sfinae-dr1227.C: New test.
-
Jonathan Wakely authored
In C++23 there is a basic_string_view(Range&&) constructor, which is constrained to take a range (specifically, a contiguous_range). When the filesystem::path comparison operators call lhs.compare(rhs) the overload taking a string_view is considered, which means checking whether path satisfies the range concept. That satisfaction result changes depending whether path::iterator is complete, which is ill-formed; no diagnostic required. To avoid the problem, this change ensures that the overload resolution is performed in a context where path::iterator is complete and the range concept is satisfied. (The result of overload resolution is always that the compare(const path&) overload is the best match, but we still have to consider the compare(basic_string_view<value_type>) one to decide if it even participates in overload resolution). For std::filesystem::path we can't define the comparison operators later in the file, because they are hidden friends, so a new helper is introduced that gets defined when everything else is complete. For std::experimental::filesystem::path we can just move the definitions of the comparison operators later in the file. Signed-off-by:
Jonathan Wakely <jwakely@redhat.com> libstdc++-v3/ChangeLog: * include/bits/fs_path.h (operator==, operator<=>): Use new _S_compare function. (path::_S_compare): New function to call path::compare in a context where path::iterator is complete. * include/experimental/bits/fs_path.h (operator<, operator==): Define after path::iterator is complete. * testsuite/27_io/filesystem/path/native/conv_c++23.cc: New test. * testsuite/experimental/filesystem/path/native/conv_c++23.cc: New test.
-
Iain Buclaw authored
Improves semantic passes in the front-end around the `foreach' and `static foreach' statements to be more resilient to compiling in a minimal D runtime environment. Checking of the index type has been improved as well so now there won't be needless compiler errors when using 8 or 16-bit integers as index types when the size fits the expected loop range. gcc/d/ChangeLog: PR d/100999 * dmd/MERGE: Merge upstream dmd 7a3808254. libphobos/ChangeLog: PR d/100999 * src/MERGE: Merge upstream phobos 55bb17543.
-
Srinath Parvathaneni authored
This patch fixes the issue mentioned in PR101016, which is mve polymorphic variants failing at linking with undefined reference to "__ARM_undef" error. gcc/ChangeLog: 2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/101016 * config/arm/arm_mve.h (__arm_vld1q): Change __ARM_mve_coerce(p0, int8_t const *) to __ARM_mve_coerce1(p0, int8_t *) in the argument for the polymorphic variants matching code. (__arm_vld1q_z): Likewise. (__arm_vld2q): Likewise. (__arm_vld4q): Likewise. (__arm_vldrbq_gather_offset): Likewise. (__arm_vldrbq_gather_offset_z): Likewise. gcc/testsuite/ChangeLog: 2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/101016 * gcc.target/arm/mve/intrinsics/pr101016.c: New test.
-
Roger Sayle authored
Doh! Wrong patch version. Sorry for the inconvenience. 2020-06-11 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR tree-optimization/96392 * fold-const.h (tree_expr_maybe_real_minus_zero_p): Fix prototype.
-
Roger Sayle authored
The patch implements a missed optimization enhancement. Under usual IEEE rules, x+0.0 can't be simplified to x when x might potentially be an IEEE minus zero (-0.0). The current logic in the middle-end checks whether the type of x should honor signed zeros, but with this patch we introduce tree_expr_maybe_real_minus_zero_p that allows us to confirm that the value can't possibly be -0.0, for example, the result of a conversion from an integer type, or the result of fabs (or has a type that doesn't honor signed zero). Whilst modifying match.pd, I also converted some additional folding transformations from "testing the type" to "testing the value". 2020-06-10 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR tree-optimization/96392 * fold-const.c (fold_real_zero_addition_p): Take both arguments of the addition or subtraction, not just the zero. Use this other argument in tests for signaling NaNs and signed zeros. (tree_expr_maybe_real_minus_zero_p): New predicate. * fold-const.h (fold_real_zero_addition_p): Update prototype. (tree_expr_maybe_real_minus_zero_p): New function prototype. * match.pd: Update calls to fold_real_zero_addition_p. Replace HONOR_NANS with tree_expr_maybe_nan_p. Replace HONOR_SIGNED_ZEROS with tree_expr_maybe_real_minus_zero_p. Replace HONOR_SNANS with tree_expr_maybe_signaling_nan_p. * tree-ssa-reassoc.c (eliminate_using_constants): Update call to fold_real_zero_addition_p. gcc/testsuite/ChangeLog PR tree-optimization/96392 * gcc.dg/pr96392.c: New test.
-
Richard Biener authored
This plugs a hole in store-motion where it fails to perform dependence checking on conditionally executed but not store-motioned refs. 2021-06-11 Richard Biener <rguenther@suse.de> PR tree-optimization/101025 * tree-ssa-loop-im.c (sm_seq_valid_bb): Make sure to process all refs that require dependence checking. * gcc.dg/torture/pr101025.c: New testcase.
-
Srinath Parvathaneni authored
The current CMSE support in the multilib build for "-march=armv8.1-m.main+mve -mfloat-abi=hard -mfpu=auto" is broken as specified in PR99939 and this patch fixes the issue. gcc/testsuite/ChangeLog: 2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/99939 * gcc.target/arm/cmse/cmse-18.c: Add separate scan-assembler directives check for target is v8.1-m.main+mve or not before comparing the assembly output. * gcc.target/arm/cmse/cmse-20.c: New test. libgcc/ChangeLog: 2021-06-11 Srinath Parvathaneni <srinath.parvathaneni@arm.com> PR target/99939 * config/arm/cmse_nonsecure_call.S: Add __ARM_FEATURE_MVE macro. * config/arm/t-arm: To link cmse.o and cmse_nonsecure_call.o on passing -mcmse option.
-
Jakub Jelinek authored
The following patch implements consteval if support. There is a new IF_STMT_CONSTEVAL_P flag on IF_STMT and IF_COND is boolean_false_node to match the non-manifestly constant evaluation behavior, while constexpr evaluation special-cases it. Perhaps cleaner would be to set the condition to __builtin_is_constant_evaluated () call but we need the IF_STMT_CONSTEVAL_P flag anyway and the IL would be larger. And I'm not changing the libstdc++ side, where perhaps we could change std::is_constant_evaluated definition for #ifdef __cpp_if_consteval case to if consteval { return true; } else { return false; } but we need to keep it defined to __builtin_is_constant_evaluated () for C++20 or older. 2021-06-11 Jakub Jelinek <jakub@redhat.com> PR c++/100974 gcc/c-family/ * c-cppbuiltin.c (c_cpp_builtins): Predefine __cpp_if_consteval for -std=c++2b for P1938R3 consteval if support. gcc/cp/ * cp-tree.h (struct saved_scope): Add consteval_if_p member. Formatting fix for the discarded_stmt comment. (in_consteval_if_p, IF_STMT_CONSTEVAL_P): Define. * parser.c (cp_parser_lambda_expression): Temporarily disable in_consteval_if_p when parsing lambda body. (cp_parser_selection_statement): Parse consteval if. * decl.c (struct named_label_entry): Add in_consteval_if member. (level_for_consteval_if): New function. (poplevel_named_label_1, check_previous_goto_1, check_goto): Handle consteval if. * constexpr.c (cxx_eval_builtin_function_call): Clarify in comment why CP_BUILT_IN_IS_CONSTANT_EVALUATED needs to *non_constant_p for !ctx->manifestly_const_eval. (cxx_eval_conditional_expression): For IF_STMT_CONSTEVAL_P evaluate condition as if it was __builtin_is_constant_evaluated call. (potential_constant_expression_1): For IF_STMT_CONSTEVAL_P always recurse on both branches. * cp-gimplify.c (genericize_if_stmt): Genericize IF_STMT_CONSTEVAL_P as the else branch. * pt.c (tsubst_expr) <case IF_STMT>: Copy IF_STMT_CONSTEVAL_P. Temporarily set in_consteval_if_p when recursing on IF_STMT_CONSTEVAL_P then branch. (tsubst_lambda_expr): Temporarily disable in_consteval_if_p when instantiating lambda body. * call.c (immediate_invocation_p): Return false when in_consteval_if_p. gcc/testsuite/ * g++.dg/cpp23/consteval-if1.C: New test. * g++.dg/cpp23/consteval-if2.C: New test. * g++.dg/cpp23/consteval-if3.C: New test. * g++.dg/cpp23/consteval-if4.C: New test. * g++.dg/cpp23/consteval-if5.C: New test. * g++.dg/cpp23/consteval-if6.C: New test. * g++.dg/cpp23/consteval-if7.C: New test. * g++.dg/cpp23/consteval-if8.C: New test. * g++.dg/cpp23/consteval-if9.C: New test. * g++.dg/cpp23/consteval-if10.C: New test. * g++.dg/cpp23/feat-cxx2b.C: Add __cpp_if_consteval tests.
-
David Malcolm authored
While debugging another issue I noticed that the analyzer could fail to merge nodes for control flow in which one path had called a function and another path hadn't: BB / \ / \ fn call no fn call \ / \ / join BB The root cause was that the worklist sort function wasn't prioritizing call strings, and thus it was fully exploring the "no function called" path to the exit BB, and only then exploring the "within the function call" parts of the "funcion called" path. This patch prioritizes call strings when sorting the worklist so that the nodes with deeper call strings are processed before those with shallower call strings, thus allowing such nodes to be merged at the joinpoint. gcc/analyzer/ChangeLog: * engine.cc (worklist::key_t::cmp): Move sort by call_string to before SCC. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/loop-0-up-to-n-by-1-with-iter-obj.c: Update expected number of enodes after the loop. * gcc.dg/analyzer/paths-8.c: New test. Signed-off-by:
David Malcolm <dmalcolm@redhat.com>
-
Richard Biener authored
This fixes a missing clearing of mismatched lanes from the fatal fail path in SLP reassoc discovery in the most conservative way. 2021-06-11 Richard Biener <rguenther@suse.de> PR tree-optimization/101028 * tree-vect-slp.c (vect_build_slp_tree_2): When SLP reassoc discovery fails fatally, mark appropriate lanes in matches[] so. * gcc.dg/pr101028.c: New testcase.
-
Richard Biener authored
Since we cannot yet encode the operation in the SLP node itself but need a representative stmt require an existing one for now to avoid the need to build a fake GIMPLE stmt. 2021-06-11 Richard Biener <rguenther@suse.de> PR tree-optimization/101026 * tree-vect-slp.c (vect_build_slp_tree_2): Make sure we have a representative for the associated chain nodes. * gfortran.dg/pr101026.f: New testcase.
-
Jakub Jelinek authored
simplify_relational_operation callees typically return just const0_rtx or const_true_rtx and then simplify_relational_operation attempts to fix that up if the comparison result has vector mode, or floating mode, or punt if it has scalar mode and vector mode operands (it doesn't know how exactly to deal with the scalar masks). But, simplify_logical_relational_operation has a special case, where it attempts to fold (x < y) | (x >= y) etc. and if it determines it is always true, it just returns const_true_rtx, without doing the dances that simplify_relational_operation does. That results in an ICE on the following testcase, where such folding happens during expansion (of debug stmts into DEBUG_INSNs) and we ICE because all of sudden a VOIDmode rtx appears where it expects a vector (V4SImode) rtx. The following patch fixes that by moving the adjustement into a separate helper routine and using it from both simplify_relational_operation and simplify_logical_relational_operation. 2021-06-11 Jakub Jelinek <jakub@redhat.com> PR rtl-optimization/101008 * simplify-rtx.c (relational_result): New function. (simplify_logical_relational_operation, simplify_relational_operation): Use it. * gcc.dg/pr101008.c: New test.
-
Jakub Jelinek authored
On Fri, Apr 23, 2021 at 12:53:58PM +0800, Hongtao Liu via Gcc-patches wrote: > -(define_insn "*vec_concatv4si_0" > - [(set (match_operand:V4SI 0 "register_operand" "=v,x") > - (vec_concat:V4SI > - (match_operand:V2SI 1 "nonimmediate_operand" "vm,?!*y") > - (match_operand:V2SI 2 "const0_operand" " C,C")))] > +(define_insn "*vec_concat<mode>_0" > + [(set (match_operand:VI124_128 0 "register_operand" "=v,x") > + (vec_concat:VI124_128 > + (match_operand:<ssehalfvecmode> 1 "nonimmediate_operand" "vm,?!*y") > + (match_operand:<ssehalfvecmode> 2 "const0_operand" " C,C")))] > "TARGET_SSE2" > "@ > %vmovq\t{%1, %0|%0, %1} > @@ -22154,6 +22157,24 @@ (define_insn "avx_vec_concat<mode>" > (set_attr "prefix" "maybe_evex") > (set_attr "mode" "<sseinsnmode>")]) > > +(define_insn_and_split "*vec_concat<mode>_0" > + [(set (match_operand:V 0 "register_operand") > + (vec_select:V > + (vec_concat:<ssedoublevecmode> > + (match_operand:V 1 "nonimmediate_operand") > + (match_operand:V 2 "const0_operand")) > + (match_parallel 3 "movq_parallel" > + [(match_operand 4 "const_int_operand")])))] > + "ix86_pre_reload_split ()" > + "#" > + "&& 1" > + [(set (match_dup 0) > + (vec_concat:V (match_dup 1) (match_dup 5)))] > +{ > + operands[1] = gen_lowpart (<ssehalfvecmode>mode, operands[1]); > + operands[5] = CONST0_RTX (<ssehalfvecmode>mode); > +}) This regressed the following testcase with -msse -mno-sse2. The define_insn_and_split splits the permutation into *vec_concat<mode>_0 or *vec_concatv2di_0 insns which both have TARGET_SSE2 in their conditions (for the former you can see it above), but the define_insn_and_split matches always when the V mode's condition do, which for V16QI/V8HI/V4SI/V2DI/V4SF modes is always (well, when those modes are valid, which is TARGET_SSE). 2021-06-11 Jakub Jelinek <jakub@redhat.com> PR target/101007 * config/i386/sse.md (*vec_concat<mode>_0_1): Require TARGET_SSE2. * gcc.target/i386/sse-pr101007.c: New test.
-
Uros Bizjak authored
Some permutations can be implemented without costly PSHUFB instruction, e.g.: { 8,9,10,11,12,13,14,15, 0,1,2,3,4,5,6,7 } with PALIGNR, { 0,1,2,3, 4,5,6,7, 4,5,6,7, 12,13,14,15 } with PSHUFD, { 0,1, 2,3, 2,3, 6,7, 8,9,10,11,12,13,14,15 } with PSHUFLW and { 0,1,2,3,4,5,6,7, 8,9, 10,11, 10,11, 14,15 } with PSHUFHW. All these instructions have constant shuffle control mask and do not need to load shuffle mask from a memory to a temporary XMM register. 2021-06-11 Uroš Bizjak <ubizjak@gmail.com> gcc/ PR target/101021 * config/i386/i386-expand.c (expand_vec_perm_pshufb): Return false if the permutation can be implemented with constant permutation instruction in wider mode. (canonicalize_vector_int_perm): Move above expand_vec_perm_pshufb. Handle V8QImode and V4HImode. gcc/testsuite/ PR target/101021 * gcc.target/i386/pr101021-1.c: New test. * gcc.target/i386/pr101021-2.c: Ditto.
-
Martin Liska authored
PR gcov-profile/100788 gcc/ChangeLog: * common.opt: Add new option. * coverage.c (coverage_begin_function): Emit warning instead on the internal compiler error. * doc/invoke.texi: Document the option. * toplev.c (process_options): Enable it by default. gcc/testsuite/ChangeLog: * gcc.dg/pr100788.c: New test.
-
Martin Liska authored
-
Richard Biener authored
This fixes recording of distance vectors in case the DDR has just constant equal indexes. In that case we expect distance vectors with zero distances to be recorded which is what was done when any distance was computed for affine indexes. 2021-06-11 Richard Biener <rguenther@suse.de> PR middle-end/101009 * tree-data-ref.c (build_classic_dist_vector_1): Make sure to set *init_b to true when we encounter a constant equal index pair. (compute_affine_dependence): Also dump the actual DR_REF. * gcc.dg/torture/pr101009.c: New testcase.
-
GCC Administrator authored
-
Martin Liska authored
contrib/ChangeLog: * gcc-changelog/git_update_version.py: Ignore commit that violates rules and was somehow pushed.
-
Kewen Lin authored
For some cases that when we load unsigned char/short values from the appropriate unsigned char/short memories and convert them to double/single precision floating point value, there would be implicit conversions to int first. It makes GCC not leverage the P9 instructions lxsibzx/lxsihzx. This patch is to add the related define_insn_and_split to support this kind of scenario. Bootstrapped/regtested on powerpc64le-linux-gnu P9 and powerpc64-linux-gnu P8. gcc/ChangeLog: * config/rs6000/rs6000.md (floatsi<SFDF:mode>2_lfiwax_<QHI:mode>_mem_zext): New define_insn_and_split. gcc/testsuite/ChangeLog: * gcc.target/powerpc/p9-fpcvt-3.c: New test.
-
Richard Biener authored
This should preserve the original association order as much as possible for the initial SLP discovery attempt and also improve consistency. 2021-06-11 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_build_slp_tree_2): Use stablesort to sort operands of the associative chain.
-
Richard Biener authored
This makes it possible to apply GCCs stable sort algorithm to vec<> and also use it with the qsort_r compatible interface. 2021-06-10 Richard Biener <rguenther@suse.de> * system.h (gcc_stablesort_r): Declare. * sort.cc (gcc_sort_r): Support stable sort. (gcc_stablesort_r): Define. * vec.h (vec<>::stablesort): Add.
-
Marek Polacek authored
Jakub pointed me at <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1938r3.html#compiler-warnings> which shows that our existing warning could be extended to handle more cases. This patch implements that. A minor annoyance was handling macros, in libstdc++ we have reference operator[](size_type __pos) { __glibcxx_assert(__pos <= size()); ... } wherein __glibcxx_assert expands to if (__builtin_is_constant_evaluated() && !bool(__pos <= size()) ... but I'm of a mind to not warn on that. Once consteval if makes it in, we should tweak this warning one more time. PR c++/100995 gcc/cp/ChangeLog: * constexpr.c (maybe_constexpr_fn): New. * cp-tree.h (maybe_constexpr_fn): Declare. * semantics.c (find_std_constant_evaluated_r): New. (maybe_warn_for_constant_evaluated): New. (finish_if_stmt_cond): Call it. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/is-constant-evaluated9.C: Add dg-warning. * g++.dg/cpp2a/is-constant-evaluated12.C: New test.
-