aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2022-03-02testsuite: Add testcases for already fixed PR [PR100541]Jakub Jelinek2-0/+49
These testcases started failing with r12-630 and one of them got fixed with r12-4531 (aka PR102764 fix and r12-4616 further improved the fix) and the other went latent in r12-2591 (i.e. threader changes) and I believe was fixed for real by the PR102764 fix too. 2022-03-02 Jakub Jelinek <jakub@redhat.com> PR debug/100541 * g++.dg/opt/pr100541-1.C: New test. * g++.dg/opt/pr100541-2.C: New test.
2022-03-02strlen: Comment spelling fixesJakub Jelinek1-2/+2
This fixes some comment spelling bugs in tree-ssa-strlen.cc. 2022-03-02 Jakub Jelinek <jakub@redhat.com> * tree-ssa-strlen.cc (strlen_pass::handle_assign, strlen_pass::before_dom_children): Comment spelling fixes.
2022-03-02modref: Comment spelling fixesJakub Jelinek4-54/+54
This fixes some spelling mistakes in ipa-modref*. 2022-03-02 Jakub Jelinek <jakub@redhat.com> * ipa-modref-tree.cc (modref_access_node::contains, modref_access_node::closer_pair_p, modref_access_node::insert, modref_access_node::insert_kill): Comment spelling fixes. * ipa-modref.cc: Likewise. (modref_summary::finalize, ignore_nondeterminism_p, class modref_access_analysis, modref_access_analysis::set_side_effects, modref_access_analysis::set_nondeterministic, modref_access_analysis::record_global_memory_load, modref_access_analysis::propagate, modref_access_analysis::analyze, struct escape_point, class modref_lattice, modref_lattice::merge, modref_lattice::merge_deref, class modref_eaf_analysis, modref_eaf_analysis::merge_call_lhs_flags, modref_eaf_analysis::analyze_ssa_name, modref_eaf_analysis::propagate, modref_eaf_analysis::record_escape_points, remap_kills, update_escape_summary, remove_useless_summaries, ipa_merge_modref_summary_after_inlining, pass_ipa_modref::execute): Likewise. * ipa-modref.h (struct modref_summary, interposable_eaf_flags): Likewise. * ipa-modref-tree.h (enum modref_special_parms, struct modref_access_node): Likewise.
2022-03-02i386: Fix pr104551 testcase for solarisHongyu Wang1-2/+4
Use avx2-check mechanism to avoid illegal instrucion on non-avx2 target. gcc/testsuite/ChangeLog: PR target/104726 * gcc.target/i386/pr104551.c: Use avx2-check.h.
2022-03-02AVX512FP16: Fix vcvt[u]si2sh runtime tests for SolarisHongyu Wang4-4/+4
Use standard C type instead of __int64_t which doesn't work on Solaris. gcc/testsuite/ChangeLog: PR target/104724 * gcc.target/i386/avx512fp16-vcvtsi2sh-1b.c: Use long long instead of __int64_t. * gcc.target/i386/avx512fp16-vcvtsi2sh64-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh-1b.c: Ditto. * gcc.target/i386/avx512fp16-vcvtusi2sh64-1b.c: Ditto.
2022-03-02Daily bump.GCC Administrator4-1/+160
2022-03-01Add a test for true positives related to PR104715.Martin Sebor1-0/+92
Related to: PR tree-optimization/104715 - false dangling pointer with strstr gcc/testsuite/ChangeLog: PR tree-optimization/104715 * gcc.dg/Wdangling-pointer-3.c: New test.
2022-03-01warn-access: Fix up check_pointer_uses [PR104715]Jakub Jelinek2-3/+38
The following testcase emits bogus -Wdangling-pointer warnings. The bug is that when it sees that ptr immediate use is a call that returns one of its arguments, it will assume that the return value is based on ptr, but that is the case only if ptr is passed to the argument that is actually returned (so e.g. for memcpy the first argument, etc.). When the builtins guarantee e.g. that the result is based on the first argument (either ERF_RETURNS_ARG 0 in which case it will always just returns the first argument as is, or when it is something like strstr or strpbrk or mempcpy that it returns some pointer based on the first argument), it means the result is not based on second or following argument if any. The second hunk fixes this. The first hunk just removes an unnecessary TREE_CODE check, the code only pushes SSA_NAMEs into the pointers vector and if it didn't, it uses FOR_EACH_IMM_USE_FAST (use_p, iter, ptr) a few lines below this, which of course requires that ptr is a SSA_NAME. Tree checking on SSA_NAME_VERSION will already ensure that if it wasn't a SSA_NAME, we'd ICE. 2022-03-01 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/104715 * gimple-ssa-warn-access.cc (pass_waccess::check_pointer_uses): Don't unnecessarily test if ptr is a SSA_NAME, it has to be. Only push lhs of a call if gimple_call_return_arg is equal to ptr, not just when it is non-NULL. * c-c++-common/Wdangling-pointer-7.c: New test.
2022-03-01warn-access: Comment spelling fixesJakub Jelinek1-15/+15
I've noticed various spelling bugs in comments in this file. There is one spot I haven't fixed: "Otherwise, VAR is the auto variable (including an unnamed temporary such as a compound literal) whose lifetime's rended it dangling." I'm afraid I don't know what it wanted to say, "lifetime rendered it" or something else? 2022-03-01 Jakub Jelinek <jakub@redhat.com> * gimple-ssa-warn-access.cc (warn_string_no_nul, maybe_warn_nonstring_arg, fndecl_alloc_p, new_delete_mismatch_p, matching_alloc_calls_p, maybe_warn_alloc_args_overflow, pass_waccess::check_alloca, pass_waccess::check_strcat, memmodel_to_uhwi, fntype_argno_type, pass_waccess::maybe_check_access_sizes, pass_waccess::check_call_access, pass_waccess::maybe_check_dealloc_call, pass_waccess::check_stmt): Comment spelling fixes.
2022-03-01d: Remove gdc.test/dhry.d from the testsuiteIain Buclaw1-947/+0
This test is not well ported, and doesn't check anything useful. gcc/testsuite/ChangeLog: PR d/104736 * gdc.test/runnable/dhry.d: Removed.
2022-03-01x86: Limit PR 35513 tests to LinuxH.J. Lu2-2/+2
Limit PR 35513 tests to Linux since they fail on 32-bit Solaris/x86 with Solaris linker. PR testsuite/104725 * g++.target/i386/pr35513-1.C: Limit to Linux. * g++.target/i386/pr35513-2.C: Likewise.
2022-03-01tree-optimization/104716 - check if we can copy loop in loop distributionRichard Biener2-1/+39
The following checks whether we can copy the loop before attempting to do so in loop distribution. In the testcase there's a computed goto and thus abnormal edges which we cannot redirect. 2022-03-01 Richard Biener <rguenther@suse.de> PR tree-optimization/104716 * tree-loop-distribution.cc (find_seed_stmts_for_distribution): Check if we can copy the loop. * gfortran.dg/pr104716.f: New testcase.
2022-03-01testsuite/104727 - remove XFAIL for gcc.target/i386/pr84101.cRichard Biener1-2/+1
2022-03-01 Richard Biener <rguenther@suse.de> PR testsuite/104727 * gcc.target/i386/pr84101.c: Remove XFAIL.
2022-03-01testsuite/104728 - constrain gcc.dg/vect/pr81196-2.cRichard Biener1-0/+2
We need to be able to reverse a vector for negative strides. 2022-03-01 Richard Biener <rguenther@suse.de> PR testsuite/104728 * gcc.dg/vect/pr81196-2.c: Require vect_perm.
2022-03-01Clear currently_expanding_gimple_stmt properlyH.J. Lu1-2/+8
commit a5883ba0de68efad36db145e75c86394d8bd44ea Author: Michael Matz <matz@gcc.gnu.org> Date: Tue Nov 24 15:37:32 2009 +0000 introduced currently_expanding_gimple_stmt, which was set and cleared in expand_gimple_basic_block when expanding gimple statement to RTL. But it isn't cleared when expand_gimple_basic_block returns inside the loop. PR middle-end/104721 * cfgexpand.cc (expand_gimple_basic_block): Clear currently_expanding_gimple_stmt when returning inside the loop.
2022-03-01Restrict new testcase gcc.target/i386/pr80270.c to x86_64.Roger Sayle1-2/+2
Committed as obvious (in hindsight). 2022-03-01 Roger Sayle <roger@nextmovesoftware.com> gcc/testsuite/ChangeLog * gcc.target/i386/pr80270.c: Don't compile new test case on ia32.
2022-03-01ipa: Improve error handling for target_clone single valueMartin Liska5-25/+44
PR ipa/104533 gcc/c-family/ChangeLog: * c-attribs.cc (handle_target_clones_attribute): Use get_target_clone_attr_len and report warning soon. gcc/ChangeLog: * multiple_target.cc (get_attr_len): Move to tree.c. (expand_target_clones): Remove single value checking. * tree.cc (get_target_clone_attr_len): New fn. * tree.h (get_target_clone_attr_len): Likewise. gcc/testsuite/ChangeLog: * g++.target/i386/pr104533.C: New test.
2022-03-01docs: Document more .gcda file name generation.Martin Liska1-1/+9
PR gcov-profile/104677 gcc/ChangeLog: * doc/invoke.texi: Document more .gcda file name generation.
2022-03-01[nvptx] Handle DCmode in define_expand "omp_simt_xchg_{bfly,idx}"Tom de Vries2-4/+33
For a test-case doing an openmp target simd reduction on a complex double: ... DOUBLE COMPLEX :: counter_N0 ... !$OMP TARGET SIMD reduction(+: counter_N0) ... we run into: ... during RTL pass: expand b.f90: In function ‘MAIN__._omp_fn.0’: b.f90:23:32: internal compiler error: in expand_insn, at optabs.cc:8029 23 | counter_N0 = counter_N0 + 1. | ^ 0x10f1cd3 expand_insn(insn_code, unsigned int, expand_operand*) gcc/optabs.cc:8029 0xeac435 expand_GOMP_SIMT_XCHG_BFLY gcc/internal-fn.cc:375 ... Fix this by handling DCmode and CDImode in define_expand "omp_simt_xchg_{bfly,idx}". Tested on x86_64 with nvptx accelerator. gcc/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> PR target/102429 * config/nvptx/nvptx.cc (nvptx_gen_shuffle): Handle DCmode and CDImode. * config/nvptx/nvptx.md (define_predicate "nvptx_register_or_complex_di_df_register_operand"): New predicate. (define_expand "omp_simt_xchg_bfly", define_expand "omp_simt_xchg_idx"): Use nvptx_register_or_complex_di_df_register_operand.
2022-03-01[nvptx] Add nvptx-gen.h and nvptx-gen.optTom de Vries9-27/+282
Use nvptx-sm.def to generate new files nvptx-gen.h and nvptx-gen.opt, and: - include nvptx-gen.h in nvptx.h, and - add nvptx-gen.opt to extra_options (before nvptx.opt, in case that matters). Tested on nvptx. gcc/ChangeLog: 2022-02-25 Tom de Vries <tdevries@suse.de> * config.gcc (nvptx*-*-*): Add nvptx/nvptx-gen.opt to extra_options. * config/nvptx/gen-copyright.sh: New file. * config/nvptx/gen-h.sh: New file. * config/nvptx/gen-opt.sh: New file. * config/nvptx/nvptx.h (TARGET_SM35, TARGET_SM53, TARGET_SM70) (TARGET_SM75, TARGET_SM80): Move ... * config/nvptx/nvptx-gen.h: ... here. New file, generate. * config/nvptx/nvptx.opt (Enum ptx_isa): Move ... * config/nvptx/nvptx-gen.opt: ... here. New file, generate. * config/nvptx/t-nvptx ($(srcdir)/config/nvptx/nvptx-gen.h) ($(srcdir)/config/nvptx/nvptx-gen.opt): New make target.
2022-03-01[nvptx] Use nvptx-sm.def for t-omp-deviceTom de Vries2-4/+36
Add a script gen-omp-device-properties.sh that uses nvptx-sm.def to generate omp-device-properties-nvptx. Tested on x86_64 with nvptx accelerator. gcc/ChangeLog: 2022-02-25 Tom de Vries <tdevries@suse.de> * config/nvptx/gen-omp-device-properties.sh: New file. * config/nvptx/t-omp-device: Use gen-omp-device-properties.sh.
2022-03-01[nvptx] Add nvptx-sm.defTom de Vries4-42/+57
Add a file gcc/config/nvptx/nvptx-sm.def that lists all sm_xx versions used in the port, like so: ... NVPTX_SM(30, NVPTX_SM_SEP) NVPTX_SM(35, NVPTX_SM_SEP) NVPTX_SM(53, NVPTX_SM_SEP) NVPTX_SM(70, NVPTX_SM_SEP) NVPTX_SM(75, NVPTX_SM_SEP) NVPTX_SM(80,) ... and use it in various places using a pattern: ... #define NVPTX_SM(XX, SEP) { ... } #include "nvptx-sm.def" #undef NVPTX_SM ... Tested on nvptx. gcc/ChangeLog: 2022-02-25 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx-sm.def: New file. * config/nvptx/nvptx-c.cc (nvptx_cpu_cpp_builtins): Use nvptx-sm.def. * config/nvptx/nvptx-opts.h (enum ptx_isa): Same. * config/nvptx/nvptx.cc (sm_version_to_string) (nvptx_omp_device_kind_arch_isa): Same.
2022-03-01[nvptx, testsuite] Add gcc.target/nvptx/sm*.cTom de Vries6-0/+36
Add a few test-cases that test passing each -misa=sm_xx version and verify that the proper __PTX_SM__ is defined. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-25 Tom de Vries <tdevries@suse.de> * gcc.target/nvptx/sm30.c: New test. * gcc.target/nvptx/sm35.c: New test. * gcc.target/nvptx/sm53.c: New test. * gcc.target/nvptx/sm70.c: New test. * gcc.target/nvptx/sm75.c: New test. * gcc.target/nvptx/sm80.c: New test.
2022-03-01arc: Fix for new ifcvt behavior [PR104154]Robin Dapp1-0/+6
ifcvt now passes a CC-mode "comparison" to backends. This patch simply returns from gen_compare_reg () in that case since nothing needs to be prepared anymore. gcc/ChangeLog: PR rtl-optimization/104154 * config/arc/arc.cc (gen_compare_reg): Return the CC-mode comparison ifcvt passed us.
2022-03-01i386: Fix V8HF vector init under -mno-avx [PR 104664]Hongyu Wang2-1/+22
For V8HFmode vector init with HFmode, do not directly emits V8HF move with subreg, which may cause reload to assign general register to move src. gcc/ChangeLog: PR target/104664 * config/i386/i386-expand.cc (ix86_expand_vector_init_duplicate): Use vec_setv8hf_0 for HF to V8HFmode move instead of subreg. gcc/testsuite/ChangeLog: PR target/104664 * gcc.target/i386/pr104664.c: New test.
2022-03-01Daily bump.GCC Administrator5-1/+190
2022-02-28PR tree-optimization/91384: peephole2 to eliminate testl after negl.Roger Sayle2-0/+33
This patch is my proposed solution to PR tree-optimization/91384 which is a missed-optimization/code quality regression on x86_64. The problematic idiom is "if (r = -a)" which is equivalent to both "r = -a; if (r != 0)" and alternatively "r = -a; if (a != 0)". In this particular case, on x86_64, we prefer to use the condition codes from the negation, rather than require an explicit testl instruction. Unfortunately, combine can't help, as it doesn't attempt to merge pairs of instructions that share the same operand(s), only pairs/triples of instructions where the result of each instruction feeds the next. But I doubt there's sufficient benefit to attempt this kind of "combination" (that wouldn't already be caught by the tree-ssa passes). Fortunately, it's relatively easy to fix this up (addressing the regression) during peephole2 to eliminate the unnecessary testl in: movl %edi, %ebx negl %ebx testl %edi, %edi je .L2 2022-02-28 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog PR tree-optimization/91384 * config/i386/i386.md (peephole2): Eliminate final testl insn from the sequence *movsi_internal, *negsi_1, *cmpsi_ccno_1 by transforming using *negsi_2 for the negation. gcc/testsuite/ChangeLog PR tree-optimization/91384 * gcc.target/i386/pr91384.c: New test case.
2022-02-28PR middle-end/80270: ICE in extract_bit_field_1Roger Sayle2-0/+25
This patch fixes PR middle-end/80270, an ICE-on-valid regression, where performing a bitfield extraction on a variable explicitly stored in a hard register by the user causes a segmentation fault during RTL expansion. Nearly identical source code without the "asm" qualifier compiles fine. The point of divergence is in simplify_gen_subreg which tries to avoid creating non-trivial SUBREGs of hard registers, to avoid problems during register allocation. This suggests the simple solution proposed here, to copy hard registers to a new pseudo in extract_integral_bit_field, just before calling simplify_gen_subreg. 2022-02-28 Roger Sayle <roger@nextmovesoftware.com> Eric Botcazou <ebotcazou@adacore.com> gcc/ChangeLog PR middle-end/80270 * expmed.cc (extract_integral_bit_field): If OP0 is a hard register, copy it to a pseudo before calling simplify_gen_subreg. gcc/testsuite/ChangeLog * gcc.target/i386/pr80270.c: New test case.
2022-02-28[PR104637] LRA: Split hard regs as many as possible on one subpassVladimir N. Makarov2-7/+57
LRA hard reg split subpass is a small subpass used as the last resort for LRA when it can not assign a hard reg to a reload pseudo by other ways (e.g. by spilling non-reload pseudos). For simplicity the subpass works on one split base (as each split changes pseudo live range info). In this case it results in reaching maximal possible number of subpasses. The patch implements as many non-overlapping hard reg splits splits as possible on each subpass. gcc/ChangeLog: PR rtl-optimization/104637 * lra-assigns.cc (lra_split_hard_reg_for): Split hard regs as many as possible on one subpass. gcc/testsuite/ChangeLog: PR rtl-optimization/104637 * gcc.target/i386/pr104637.c: New.
2022-02-28d: Merge upstream dmd cf63dd8e5, druntime caf14b0f, phobos 41aaf8c26.Iain Buclaw42-581/+725
D front-end changes: - Import dmd v2.099.0-rc.1. - The `main' can now return type `noreturn' and supports return inference. D Runtime changes: - Import druntime v2.099.0-rc.1. - C bindings for stat_t on powerpc-linux has been fixed. Phobos changes: - Import phobos v2.099.0-rc.1. gcc/d/ChangeLog: * d-target.cc (Target::_init): Initialize C type size fields. * dmd/MERGE: Merge upstream dmd cf63dd8e5. * dmd/VERSION: Update version to v2.099.0-rc.1. libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime caf14b0f. * src/MERGE: Merge upstream phobos 41aaf8c26. gcc/testsuite/ChangeLog: * gdc.dg/torture/simd7413a.d: Update. * gdc.dg/ubsan/pr88957.d: Update. * gdc.dg/simd18489.d: New test. * gdc.dg/torture/simd21727.d: New test.
2022-02-28c++: Lost deprecated/unavailable attr in class tmpl [PR104682]Marek Polacek7-6/+133
When looking into the other PR I noticed that we fail to give a warning for a deprecated enumerator when the enum is in a class template. This only happens when the attribute doesn't have an argument. The reason is that when we tsubst_enum, we create a new enumerator: build_enumerator (DECL_NAME (decl), value, newtag, DECL_ATTRIBUTES (decl), DECL_SOURCE_LOCATION (decl)); but DECL_ATTRIBUTES (decl) is null when the attribute was provided without an argument -- in that case it simply melts into a tree flag. handle_deprecated_attribute has: if (!args) *no_add_attrs = true; so the attribute isn't retained and we lose it when tsubsting. Same thing when the attribute is on the enum itself. Attribute unavailable is a similar case, but it's different in that it can be a late attribute whereas "deprecated" can't: is_late_template_attribute has /* But some attributes specifically apply to templates. */ && !is_attribute_p ("abi_tag", name) && !is_attribute_p ("deprecated", name) && !is_attribute_p ("visibility", name)) return true; else return false; which looks strange, but attr-unavailable-9.C tests that we don't error when the attribute is applied on a template. PR c++/104682 gcc/cp/ChangeLog: * cp-tree.h (build_enumerator): Adjust. * decl.cc (finish_enum): Make it return the new decl. * pt.cc (tsubst_enum): Propagate TREE_DEPRECATED and TREE_UNAVAILABLE. gcc/testsuite/ChangeLog: * g++.dg/ext/attr-unavailable-10.C: New test. * g++.dg/ext/attr-unavailable-11.C: New test. * g++.dg/warn/deprecated-17.C: New test. * g++.dg/warn/deprecated-18.C: New test.
2022-02-28c++: ICE with attribute on enumerator [PR104667]Marek Polacek2-0/+14
When processing a template, the enumerators we build don't have a type yet. But is_late_template_attribute is not prepared to see a _DECL without a type, so we crash on enum tree_code code = TREE_CODE (type); (I found that we don't give the "is deprecated" warning for the enumerator 'f' in the test. Reported as PR104682.) PR c++/104667 gcc/cp/ChangeLog: * decl2.cc (is_late_template_attribute): Cope with a decl without a type. gcc/testsuite/ChangeLog: * g++.dg/ext/attrib64.C: New test.
2022-02-28Suppress uninitialized warnings for new created uses from ↵Qing Zhao4-1/+43
__builtin_clear_padding folding [PR104550] __builtin_clear_padding(&object) will clear all the padding bits of the object. actually, it doesn't involve any use of an user variable. Therefore, users do not expect any uninitialized warning from it. It's reasonable to suppress uninitialized warnings for all new created uses from __builtin_clear_padding folding. PR middle-end/104550 gcc/ChangeLog: * gimple-fold.cc (clear_padding_flush): Suppress warnings for new created uses. gcc/testsuite/ChangeLog: * gcc.dg/auto-init-pr104550-1.c: New test. * gcc.dg/auto-init-pr104550-2.c: New test. * gcc.dg/auto-init-pr104550-3.c: New test.
2022-02-28Fix error recovery in toplev::finalize.Martin Liska2-3/+12
PR ipa/104648 gcc/ChangeLog: * main.cc (main): Use flag_checking instead of CHECKING_P and run toplev::finalize only if there is not error seen. gcc/testsuite/ChangeLog: * g++.dg/pr104648.C: New test.
2022-02-28Simplify PRE fixRichard Biener1-8/+1
The following reverts a part of the PR103037 fix which is no longer necessary after the fix for PR104700. That makes the possible cummulative backport smaller. 2022-02-28 Richard Biener <rguenther@suse.de> * tree-ssa-pre.cc (compute_avail): Revert part of last change.
2022-02-28tree-optimization/104700 - adjust constant handling in PRERichard Biener3-15/+70
The following refactors find_or_generate_expression to more properly handle constant valued SSA names thereby simplifying the code and avoiding ICEing after the last change to NARY processing. 2022-02-28 Richard Biener <rguenther@suse.de> PR tree-optimization/104700 * tree-ssa-pre.cc (get_or_alloc_expr_for): Remove and inline into ... (find_or_generate_expression): ... here, simplifying code. * gcc.dg/pr104700-2.c: New testcase. * gcc.dg/torture/pr104700-1.c: Likewise.
2022-02-28[nvptx, testsuite] Add -mptx=_ in nvptx.exp test-casesTom de Vries11-11/+11
When running with target board nvptx-none-run/-mptx=3.1, I run into: ... cc1: error: PTX version (-mptx) needs to be at least 4.2 to support selected \ -misa (sm_53)^M compiler exited with status 1 FAIL: gcc.target/nvptx/atomic-store-1.c (test for excess errors) ... Fix this and similar cases by adding an explicit -mptx=_ setting. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> * gcc.target/nvptx/atomic-store-1.c: Add -mptx=_. * gcc.target/nvptx/atomic-store-2.c: Same. * gcc.target/nvptx/float16-1.c: Same. * gcc.target/nvptx/float16-2.c: Same. * gcc.target/nvptx/float16-3.c: Same. * gcc.target/nvptx/float16-4.c: Same. * gcc.target/nvptx/float16-5.c: Same. * gcc.target/nvptx/float16-6.c: Same. * gcc.target/nvptx/tanh-1.c: Same. * gcc.target/nvptx/uniform-simt-1.c: Same. * gcc.target/nvptx/uniform-simt-3.c: Same.
2022-02-28[nvptx] Add -mptx=_Tom de Vries3-1/+6
Add an -mptx=_ value, that indicates the default ptx version. It can be used to undo an explicit -mptx setting, so this: ... $ gcc test.c -mptx=3.1 -mptx=_ ... has the same effect as: ... $ gcc test.c ... Tested on nvptx. gcc/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx-opts.h (enum ptx_version): Add PTX_VERSION_default. * config/nvptx/nvptx.cc (handle_ptx_version_option): Handle PTX_VERSION_default. * config/nvptx/nvptx.opt: Add EnumValue "_" / PTX_VERSION_default.
2022-02-28[nvptx, testsuite] Add -misa=sm_30 in nvptx/atomic-store-3.cTom de Vries1-1/+1
When running with target board nvptx-none-run/-misa=sm_70 I run into: ... FAIL: gcc.target/nvptx/atomic-store-3.c scan-assembler-times st.global.u32 1 FAIL: gcc.target/nvptx/atomic-store-3.c scan-assembler-times st.global.u64 1 ... Fix this by adding an explicit -misa=sm_30 in the test-case. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> * gcc.target/nvptx/atomic-store-3.c: Add -misa=sm_30.
2022-02-28[nvptx, testsuite] Add -misa=sm_30 in nvptx/uniform-simt-2.cTom de Vries1-1/+1
When running with target board nvptx-none-run/-misa=sm_53 we run into: ... cc1: error: PTX version (-mptx) needs to be at least 4.2 to support selected \ -misa (sm_53)^M compiler exited with status 1 FAIL: gcc.target/nvptx/uniform-simt-2.c (test for excess errors) ... Fix this by adding an explicit -misa=sm_30 in the test-case. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> * gcc.target/nvptx/uniform-simt-2.c: Add -misa=sm_30.
2022-02-28[nvptx, testsuite] Add -misa=sm_35 in nvptx/rotate.cTom de Vries1-1/+1
When running with target board nvptx-none-run/-misa=sm_30 we run into: ... FAIL: gcc.target/nvptx/rotate.c scan-assembler-times shf.l.wrap.b32 1 FAIL: gcc.target/nvptx/rotate.c scan-assembler-times shf.r.wrap.b32 1 FAIL: gcc.target/nvptx/rotate.c scan-assembler-not and.b32 ... Fix this by adding an explicit -misa=sm_35 in the test-case. Tested on nvptx. gcc/testsuite/ChangeLog: 2022-02-28 Tom de Vries <tdevries@suse.de> * gcc.target/nvptx/rotate.c: Add -misa=sm_35.
2022-02-28rtl-optimization/104686 - speed up conflict iterationRichard Biener1-4/+6
The following replaces /* Skip bits that are zero. */ for (; (word & 1) == 0; word >>= 1) bit_num++; idioms in ira-int.h in the attempt to speedup update_conflict_hard_regno_costs which we're bound on in PR104686. The trick is to use ctz_hwi here which should pay off even with dense bitmaps on architectures that have HW support for this. For the PR in question this speeds up compile-time from 31s to 24s for me. 2022-02-25 Richard Biener <rguenther@suse.de> PR rtl-optimization/104686 * ira-int.h (minmax_set_iter_cond): Use ctz_hwi to elide loop skipping bits that are zero. (ira_object_conflict_iter_cond): Likewise.
2022-02-28AVX512F: Add helper enumeration for ternary logic intrinsics.Hongyu Wang7-173/+285
Sync with llvm change in https://reviews.llvm.org/D120307 to add enumeration and truncate imm to unsigned char, so users could use ~ on immediates. gcc/ChangeLog: * config/i386/avx512fintrin.h (_MM_TERNLOG_ENUM): New enum. (_mm512_ternarylogic_epi64): Truncate imm to unsigned char to avoid error when using ~enum as parameter. (_mm512_mask_ternarylogic_epi64): Likewise. (_mm512_maskz_ternarylogic_epi64): Likewise. (_mm512_ternarylogic_epi32): Likewise. (_mm512_mask_ternarylogic_epi32): Likewise. (_mm512_maskz_ternarylogic_epi32): Likewise. * config/i386/avx512vlintrin.h (_mm256_ternarylogic_epi64): Adjust imm param type to unsigned char. (_mm256_mask_ternarylogic_epi64): Likewise. (_mm256_maskz_ternarylogic_epi64): Likewise. (_mm256_ternarylogic_epi32): Likewise. (_mm256_mask_ternarylogic_epi32): Likewise. (_mm256_maskz_ternarylogic_epi32): Likewise. (_mm_ternarylogic_epi64): Likewise. (_mm_mask_ternarylogic_epi64): Likewise. (_mm_maskz_ternarylogic_epi64): Likewise. (_mm_ternarylogic_epi32): Likewise. (_mm_mask_ternarylogic_epi32): Likewise. (_mm_maskz_ternarylogic_epi32): Likewise. gcc/testsuite/ChangeLog: * gcc.target/i386/avx512f-vpternlogd-1.c: Use new enum. * gcc.target/i386/avx512f-vpternlogq-1.c: Likewise. * gcc.target/i386/avx512vl-vpternlogd-1.c: Likewise. * gcc.target/i386/avx512vl-vpternlogq-1.c: Likewise. * gcc.target/i386/testimm-10.c: Remove imm check for vpternlog insns since the imm has been truncated in intrinsic.
2022-02-28Daily bump.GCC Administrator3-1/+12
2022-02-27c++: (*(fn))() [PR104618]Jason Merrill2-3/+10
The patch for PR90451 deferred marking to the point of actual use; we missed this one because of the parens. PR c++/104618 gcc/cp/ChangeLog: * typeck.cc (cp_build_addr_expr_1): Also maybe_undo_parenthesized_ref. gcc/testsuite/ChangeLog: * g++.dg/overload/paren1.C: New test.
2022-02-27Daily bump.GCC Administrator1-1/+1
2022-02-26Daily bump.GCC Administrator3-1/+147
2022-02-25match.pd: Further complex simplification fixes [PR104675]Jakub Jelinek2-2/+31
Mark mentioned in the PR further 2 simplifications that also ICE with complex types. For these, eventually (but IMO GCC 13 materials) we could support it for vector types if it would be uniform vector constants. Currently integer_pow2p is true only for INTEGER_CSTs and COMPLEX_CSTs and we can't use bit_and etc. for complex type. 2022-02-25 Jakub Jelinek <jakub@redhat.com> Marc Glisse <marc.glisse@inria.fr> PR tree-optimization/104675 * match.pd (t * 2U / 2 -> t & (~0 / 2), t / 2U * 2 -> t & ~1): Restrict simplifications to INTEGRAL_TYPE_P. * gcc.dg/pr104675-3.c : New test.
2022-02-25rs6000: Use rs6000_emit_move in movmisalign<mode> expander [PR104681]Jakub Jelinek2-1/+23
The following testcase ICEs, because for some strange reason it decides to use movmisaligntf during expansion where the destination is MEM and source is CONST_DOUBLE. For normal mov<mode> expanders the rs6000 backend uses rs6000_emit_move to ensure that if one operand is a MEM, the other is a REG and a few other things, but for movmisalign<mode> nothing enforced this. The middle-end documents that movmisalign<mode> shouldn't fail, so we can't force that through predicates or condition on the expander. 2022-02-25 Jakub Jelinek <jakub@redhat.com> PR target/104681 * config/rs6000/vector.md (movmisalign<mode>): Use rs6000_emit_move. * g++.dg/opt/pr104681.C: New test.
2022-02-25testsuite: Move pr104540.C test to g++.target/i386/Jakub Jelinek1-0/+0
Both -mforce-drap and -mstackrealign options are x86 specific. 2022-02-25 Jakub Jelinek <jakub@redhat.com> * g++.dg/pr104540.C: Move to ... * g++.target/i386/pr104540.C: ... here.