[PATCH] Restore can_be_invalidated_p semantics to before refactoring

2021-11-25 Thread Richard Biener via Gcc-patches
This restores the semantics of can_be_invalidated_p to the original semantics of the function this was split out from tree-ssa-uninit.c. The current semantics only ever look at the first predicate which cannot be correct. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard.

Re: [PATCH] Loop unswitching: support gswitch statements.

2021-11-25 Thread Richard Biener via Gcc-patches
On Thu, Nov 25, 2021 at 11:38 AM Aldy Hernandez wrote: > > On Wed, Nov 24, 2021 at 9:00 AM Richard Biener > wrote: > > > > On Tue, Nov 23, 2021 at 5:36 PM Martin Liška wrote: > > > > > > On 11/23/21 16:20, Martin Liška wrote: > > > > Sure, so for e.g. case 1 ... 5 we would need to create a new

Re: [PATCH take 3] ivopts: Improve code generated for very simple loops.

2021-11-25 Thread Richard Biener via Gcc-patches
On Thu, Nov 25, 2021 at 7:17 PM Roger Sayle wrote: > > > On Tue, Nov 23, 2021 at 12:46PM Richard Biener < richard.guent...@gmail.com> > wrote: > > On Thu, Nov 18, 2021 at 4:18 PM Roger Sayle > > wrote: > > > > The patch doesn't add any testcase. > > > > > > The three new attached tests check

[Bug fortran/103434] New: Pointer subobject does not show to correct memory location

2021-11-25 Thread baradi09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103434 Bug ID: 103434 Summary: Pointer subobject does not show to correct memory location Product: gcc Version: 10.1.0 Status: UNCONFIRMED Severity: normal

[Bug ipa/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Richard Biener changed: What|Removed |Added Priority|P3 |P1

[Bug middle-end/103431] [12 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-dominator-opts

2021-11-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103431 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Keywords|

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-11-25 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 --- Comment #7 from rguenther at suse dot de --- On Fri, 26 Nov 2021, wilson at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 > > Jim Wilson changed: > >What|Removed |Added

[Bug target/102768] [feature request] Add compiler support for aarch64 shadow call stack

2021-11-25 Thread ashimida at linux dot alibaba.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102768 --- Comment #6 from ashimida --- RFC,v2: https://gcc.gnu.org/pipermail/gcc-patches/2021-November/585496.html

[PATCH] [RFC, v2, 1/1, AARCH64][PR102768] aarch64: Add compiler support for Shadow Call Stack

2021-11-25 Thread Dan Li via Gcc-patches
Shadow Call Stack can be used to protect the return address of a function at runtime, and clang already supports this feature[1]. To enable SCS in user mode, in addition to compiler, other support is also required (as discussed in [2]). This patch only adds basic support for SCS from the compiler

Re: [EXTERNAL] Re: Question about match.pd

2021-11-25 Thread Richard Biener via Gcc
On Thu, Nov 25, 2021 at 10:40 PM Navid Rahimi via Gcc wrote: > > > (A << B) eq/ne 0 > Yes that is correct. But for detecting such pattern you You have to detect B > and make sure B is boolean. GIMPLE transfers that Boolean to integer before > shifting. Note it's the C language specification

Re: atomic_load

2021-11-25 Thread Martin Uecker via Gcc
Am Sonntag, den 07.11.2021, 10:08 +0100 schrieb Martin Uecker: > It would be great if somebody could take a look at > PR96159. > > It seems we do not do atomic accesses correctly > when the alignment is insufficient for a lockfree > access, but I think we should fall back to a > library call in

[r12-5536 Regression] FAIL: gfortran.dg/widechar_2.f90 -O0 (test for excess errors) on Linux/x86_64

2021-11-25 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 90cb088ece8d8cc1019d25629d1585e5b0234179 is the first bad commit commit 90cb088ece8d8cc1019d25629d1585e5b0234179 Author: konglin1 Date: Wed Nov 10 09:37:32 2021 +0800 i386: vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c [PR 102811]

Re: [PATCH v3 0/8] __builtin_dynamic_object_size

2021-11-25 Thread Siddhesh Poyarekar
On 11/26/21 10:58, Siddhesh Poyarekar wrote: sure it works) and saw no issues in any of those builds. I did some rudimentary analysis of the generated binaries using fortify-metrics[1] to confirm that there was a difference in coverage between the two fortification levels. Here is a summary of

[PATCH v3 8/8] tree-object-size: Dynamic sizes for ADDR_EXPR

2021-11-25 Thread Siddhesh Poyarekar
Allow returning dynamic expressions from ADDR_EXPR for __builtin_dynamic_object_size and also allow offsets to be dynamic. gcc/ChangeLog: * tree-object-size.c (size_valid_p): New function. (size_for_offset): Remove OFFSET constness assertion. (addr_object_size): Build

[PATCH v3 7/8] tree-object-size: Handle GIMPLE_CALL

2021-11-25 Thread Siddhesh Poyarekar
Handle non-constant expressions in GIMPLE_CALL arguments. Also handle alloca. gcc/ChangeLog: * tree-object-size.c (alloc_object_size): Make and return non-constant size expression. (call_object_size): Return expression or unknown based on whether dynamic object

[PATCH v3 5/8] tree-object-size: Support dynamic sizes in conditions

2021-11-25 Thread Siddhesh Poyarekar
Handle GIMPLE_PHI and conditionals specially for dynamic objects, returning PHI/conditional expressions instead of just a MIN/MAX estimate. This makes the returned object size variable for loops and conditionals, so tests need to be adjusted to look for precise size in some cases.

[PATCH v3 6/8] tree-object-size: Handle function parameters

2021-11-25 Thread Siddhesh Poyarekar
Handle hints provided by __attribute__ ((access (...))) to compute dynamic sizes for objects. gcc/ChangeLog: * tree-object-size.c: Include tree-dfa.h. (parm_object_size): New function. (collect_object_sizes_for): Call it. gcc/testsuite/ChangeLog: *

[PATCH v3 4/8] __builtin_dynamic_object_size: Recognize builtin

2021-11-25 Thread Siddhesh Poyarekar
Recognize the __builtin_dynamic_object_size builtin and add paths in the object size path to deal with it, but treat it like __builtin_object_size for now. Also add tests to provide the same testing coverage for the new builtin name. gcc/ChangeLog: * builtins.def

[PATCH v3 3/8] tree-object-size: Save sizes as trees and support negative offsets

2021-11-25 Thread Siddhesh Poyarekar
Transform tree-object-size to operate on tree objects instead of host wide integers. This makes it easier to extend to dynamic expressions for object sizes. The compute_builtin_object_size interface also now returns a tree expression instead of HOST_WIDE_INT, so callers have been adjusted to

[PATCH v3 2/8] tree-object-size: Abstract object_sizes array

2021-11-25 Thread Siddhesh Poyarekar
Put all accesses to object_sizes behind functions so that we can add dynamic capability more easily. gcc/ChangeLog: * tree-object-size.c (object_sizes_grow, object_sizes_release, object_sizes_unknown_p, object_sizes_get, object_size_set_force, object_sizes_set): New

[PATCH v3 1/8] tree-object-size: Replace magic numbers with enums

2021-11-25 Thread Siddhesh Poyarekar
A simple cleanup to allow inserting dynamic size code more easily. gcc/ChangeLog: * tree-object-size.c: New enum. (object_sizes, computed, addr_object_size, compute_builtin_object_size, expr_object_size, call_object_size, merge_object_sizes, plus_stmt_object_size,

[PATCH v3 0/8] __builtin_dynamic_object_size

2021-11-25 Thread Siddhesh Poyarekar
This patchset implements the __builtin_dynamic_object_size builtin for gcc. The primary motivation to have this builtin in gcc is to enable _FORTIFY_SOURCE=3 support with gcc, thus allowing greater fortification in use cases where the potential performance tradeoff is acceptable. Semantics:

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 --- Comment #6 from Jim Wilson --- See also bug 103302 which can also be fixed by adding a movti pattern.

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #4 from Jim Wilson --- See also bug 103271 which can also be fixed by adding a movti pattern.

[Bug target/103271] ICE in assign_stack_temp_for_type with -ftrivial-auto-var-init=pattern and VLAs and -mno-strict-align on riscv64

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103271 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #5

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 --- Comment #3 from Jim Wilson --- Maybe the register allocator should remove clobbers of pseudos, instead of turning them into clobbers of hard register pairs. That would eliminate the ambiguity after register allocation. It is also true

[r12-5531 Regression] FAIL: gcc.dg/ipa/inline-9.c scan-ipa-dump inline "Inlined 1 calls" on Linux/x86_64

2021-11-25 Thread sunil.k.pandey via Gcc-patches
On Linux/x86_64, 1b0acc4b800b589a39d637d7312da5cf969a5765 is the first bad commit commit 1b0acc4b800b589a39d637d7312da5cf969a5765 Author: Jan Hubicka Date: Thu Nov 25 23:58:48 2021 +0100 Remove forgotten early return in ipa_value_range_from_jfunc caused FAIL: gcc.dg/ipa/inline-9.c

[Bug target/103433] ICE in convert_move, at expr.c:219

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103433 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Keywords|

[Bug c/103433] New: ICE in convert_move, at expr.c:219

2021-11-25 Thread ilyply2006 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103433 Bug ID: 103433 Summary: ICE in convert_move, at expr.c:219 Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug ipa/102059] Incorrect always_inline diagnostic in LTO mode with #pragma GCC target("cpu=power10")

2021-11-25 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102059 --- Comment #25 from Kewen Lin --- Status update: > > The fusion related flags have been considered in the posted patch: > https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html. > It's still being ping-ed for review since

[Bug target/102347] "fatal error: target specific builtin not available" with MMA and LTO

2021-11-25 Thread linkw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102347 Kewen Lin changed: What|Removed |Added CC||segher at gcc dot gnu.org,

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Target Milestone|---

[Bug c++/98360] sizeof in template difference between g++/icc and clang++

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98360 --- Comment #3 from Andrew Pinski --- GCC, ICC and MSVC all agree that this is valid code and all produce 4. clang is the only one which rejects it. Here is an even more reduced testcase: template struct uintset { T values[1]; struct

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #4 from Hongtao.liu --- Fixed in GCC12.

[Bug target/102811] vcvtph2ps and vcvtps2ph should be used to convert _Float16 to SFmode with -mf16c

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102811 --- Comment #3 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:90cb088ece8d8cc1019d25629d1585e5b0234179 commit r12-5536-g90cb088ece8d8cc1019d25629d1585e5b0234179 Author: konglin1 Date: Wed Nov

[Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103419 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32

2021-11-25 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103419 --- Comment #5 from Hongtao.liu --- Fixed in GCC12.

[Bug middle-end/103419] FAIL: gcc.target/i386/pr102566-10b.c with -mx32

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103419 --- Comment #4 from CVS Commits --- The master branch has been updated by hongtao Liu : https://gcc.gnu.org/g:379be00f45f65e0e8de72a50553dd9d2bab6cc08 commit r12-5535-g379be00f45f65e0e8de72a50553dd9d2bab6cc08 Author: liuhongt Date: Thu Nov

[Bug testsuite/103335] [12 Regression] new test case gcc.dg/tree-ssa/modref-dse-4.c fails

2021-11-25 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103335 Bug 103335 depends on bug 103282, which changed state. Bug 103282 Summary: New test case gcc.dg/tree-ssa/modref-dse-5.c in r12-5292 fails https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103282 What|Removed

[Bug testsuite/103282] New test case gcc.dg/tree-ssa/modref-dse-5.c in r12-5292 fails

2021-11-25 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103282 Jan Hubicka changed: What|Removed |Added Resolution|--- |FIXED Status|REOPENED

[Bug ipa/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org

[Bug ipa/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Andrew Pinski changed: What|Removed |Added Keywords||needs-reduction, wrong-code Last

[Bug tree-optimization/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread hubicka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Jan Hubicka changed: What|Removed |Added Ever confirmed|0 |1 Target Milestone|12.0

[Bug target/103302] wrong code with -fharden-compares

2021-11-25 Thread wilson at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103302 Jim Wilson changed: What|Removed |Added CC||wilson at gcc dot gnu.org --- Comment #2

[Bug ipa/103432] [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Target Milestone|---

[Bug tree-optimization/103432] New: [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref

2021-11-25 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103432 Bug ID: 103432 Summary: [12 regression] libjxl-0.5 is miscompiled, works fine with -fno-ipa-modref Product: gcc Version: 12.0 Status: UNCONFIRMED Severity:

[Bug c++/92385] extremely long and memory intensive compilation for brace construction of array member

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92385 Andrew Pinski changed: What|Removed |Added CC||beyondstandard at gmail dot com ---

[Bug c++/71165] std::array with aggregate initialization generates huge code

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71165 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug c++/92385] extremely long and memory intensive compilation for brace construction of array member

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92385 Andrew Pinski changed: What|Removed |Added CC||hehaochen at hotmail dot com ---

[Bug c++/94957] Compilation slowww for simple code with big array of structs with constructors

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94957 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/94957] Compilation slowww for simple code with -O1/2/3 and -g in GCC 8 and 9

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94957 Andrew Pinski changed: What|Removed |Added CC||ilord.tiran at yandex dot ru ---

[Bug c++/98547] GCC spends many minutes instead of seconds building a file with array initialization

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98547 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug fortran/103418] random_number() does not accept pointer, intent(in) array argument

2021-11-25 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 --- Comment #8 from Steve Kargl --- On Thu, Nov 25, 2021 at 02:18:46PM -0800, Steve Kargl wrote: > On Thu, Nov 25, 2021 at 10:10:32PM +, anlauf at gcc dot gnu.org wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 > > > > ---

[Bug c/98487] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155 [C2X attribute syntax, gnu::format and -Wsuggest-attribute=format]

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98487 Andrew Pinski changed: What|Removed |Added Keywords||ice-checking Ever confirmed|0

[committed] libstdc++: Remove dg-error that no longer happens

2021-11-25 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. There was a c++11_only dg-error in this testcase, for a "body of constexpr function is not a return statement" diagnostic that was bogus, but happened because the return statement was ill-formed. A change to G++ earlier this month means that diagnostic is

[committed] libstdc++: Make std::pointer_traits SFINAE-friendly [PR96416]

2021-11-25 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. This implements the resolution I'm proposing for LWG 3545, to avoid hard errors when using std::to_address for types that make pointer_traits ill-formed. Consistent with std::iterator_traits, instantiating std::pointer_traits for a non-pointer type will be

[Bug libstdc++/96416] [DR 3545] to_address() is broken by static_assert in pointer_traits

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96416 --- Comment #21 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:b8018e5c5ec0e9b6948182f13fba47c67b758d8a commit r12-5532-gb8018e5c5ec0e9b6948182f13fba47c67b758d8a Author: Jonathan Wakely

[Bug libstdc++/101608] ranges::fill/fill_n missing std::is_constant_evaluated() condition for __builtin_memset

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101608 --- Comment #3 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:7ae6e4e3831429d20eea1be285dbc6a4a005930f commit r11-9314-g7ae6e4e3831429d20eea1be285dbc6a4a005930f Author: Jonathan

[Bug middle-end/103393] [12 Regression] Generating 256bit register usage with -mprefer-avx128 -mprefer-vector-width=128

2021-11-25 Thread hjl.tools at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103393 --- Comment #14 from H.J. Lu --- (In reply to Richard Earnshaw from comment #13) > Also, note that the comment in gimple-fold.c prior to this change read: > > /* If we can perform the copy efficiently with first doing all loads >

[PATCH] x86: Add -mmove-max=bits and -mstore-max=bits

2021-11-25 Thread H.J. Lu via Gcc-patches
Add -mmove-max=bits and -mstore-max=bits to enable 256-bit/512-bit move and store, independent of -mprefer-vector-width=bits: 1. Add X86_TUNE_AVX512_MOVE_BY_PIECES and X86_TUNE_AVX512_STORE_BY_PIECES which are enabled for Intel Sapphire Rapids processor. 2. Add -mmove-max=bits to set the maximum

[Bug tree-optimization/98304] Failure to optimize bitwise arithmetic pattern

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98304 --- Comment #2 from Andrew Pinski --- > @1 == (@2)-1 Should have been: @1 == -(@2-1) maybe check that @1 is a mask.

gcc-9-20211125 is now available

2021-11-25 Thread GCC Administrator via Gcc
Snapshot gcc-9-20211125 is now available on https://gcc.gnu.org/pub/gcc/snapshots/9-20211125/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 9 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug tree-optimization/98304] Failure to optimize bitwise arithmetic pattern

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98304 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-11-25 Severity|normal

[Bug tree-optimization/103409] [12 Regression] 18% SPEC2017 WRF compile-time regression with -O2 -flto since r12-3903-g0288527f47cec669

2021-11-25 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103409 --- Comment #6 from hubicka at kam dot mff.cuni.cz --- > Started with r12-3903-g0288527f47cec669. This is September change (for which we have PR102943) however the regression range was g:1ae8edf5f73ca5c3 (or g:264f061997c0a534 on second plot)

[Bug rtl-optimization/79048] Unnecessary reload for flags setting insn when operands die

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79048 Roger Sayle changed: What|Removed |Added Target Milestone|--- |12.0 Resolution|---

[Bug fortran/103418] random_number() does not accept pointer, intent(in) array argument

2021-11-25 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 --- Comment #7 from Steve Kargl --- On Thu, Nov 25, 2021 at 10:10:32PM +, anlauf at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 > > --- Comment #6 from anlauf at gcc dot gnu.org --- > Unfortunately the

[Bug tree-optimization/103423] [12 Regression] 19% cpu2006 wrf compile time regression with -flto since r12-3903-g0288527f47cec669

2021-11-25 Thread hubicka at kam dot mff.cuni.cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103423 --- Comment #1 from hubicka at kam dot mff.cuni.cz --- Martin, My original report here was on regression at July 17 2021 (range g:0b7a11874d4eb428 and g:704e8a825c78b9a8) which seems unrelated to g:r12-3903-g0288527f47cec669 which is in Sep 21

[Bug c++/98030] error message for enum definition without ';' could be improved to include a fixit note

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98030 Andrew Pinski changed: What|Removed |Added Summary|error message for enum |error message for enum

[Bug fortran/103418] random_number() does not accept pointer, intent(in) array argument

2021-11-25 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 --- Comment #6 from anlauf at gcc dot gnu.org --- Unfortunately the patch in comment#5 does not work for me. :-( Interestingly, the Intel compiler fails on the testcase, too.

[PATCH, v2] PR fortran/103411 - ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377

2021-11-25 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 25.11.21 um 22:02 schrieb Mikael Morin: Le 25/11/2021 à 21:03, Harald Anlauf a écrit : Hi Mikael, Am 25.11.21 um 17:46 schrieb Mikael Morin: Hello, Le 24/11/2021 à 22:32, Harald Anlauf via Fortran a écrit : diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index

Re: [EXTERNAL] Re: Question about match.pd

2021-11-25 Thread Navid Rahimi via Gcc
> (A << B) eq/ne 0 Yes that is correct. But for detecting such pattern you You have to detect B and make sure B is boolean. GIMPLE transfers that Boolean to integer before shifting. After many hours of debugging, I think I managed to find out what is going on. +/* cmp : ==, != */ +/* ((B0 <<

[Bug middle-end/103431] [12 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-dominator-opts

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103431 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

Re: libstdc++: Make atomic::wait() const [PR102994]

2021-11-25 Thread Jonathan Wakely via Gcc-patches
On Wed, 24 Nov 2021 at 01:27, Thomas Rodgers wrote: > > const qualification was also missing in the free functions for > wait/wait_explicit/notify_one/notify_all. Revised patch attached. Please tweak the whitespace in the new test: > +test1(const std::atomic , char*p) The '&' should be on the

Re: [PATCH v7] rtl: builtins: (not just) rs6000: Add builtins for fegetround, feclearexcept and feraiseexcept [PR94193]

2021-11-25 Thread Segher Boessenkool
Hi! On Wed, Nov 24, 2021 at 08:48:47PM -0300, Raoni Fassina Firmino wrote: > gcc/ChangeLog: > * builtins.c (expand_builtin_fegetround): New function. > (expand_builtin_feclear_feraise_except): New function. > (expand_builtin): Add cases for BUILT_IN_FEGETROUND, >

[Bug rtl-optimization/103431] New: [12 Regression] wrong code with -O -fno-tree-bit-ccp -fno-tree-dominator-opts

2021-11-25 Thread zsojka at seznam dot cz via Gcc-bugs
ble-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r12-5528-20211125184355-g9488d242066-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20211125 (experimental) (GCC)

[Bug fortran/103418] random_number() does not accept pointer, intent(in) array argument

2021-11-25 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 --- Comment #5 from Steve Kargl --- On Thu, Nov 25, 2021 at 09:02:34PM +, anlauf at gcc dot gnu.org wrote: > (In reply to kargl from comment #3) > > (In reply to anlauf from comment #2) > > > The nearly obvious fix: > > > > > > diff --git

[Bug fortran/103418] random_number() does not accept pointer, intent(in) array argument

2021-11-25 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103418 --- Comment #4 from anlauf at gcc dot gnu.org --- (In reply to kargl from comment #3) > (In reply to anlauf from comment #2) > > The nearly obvious fix: > > > > diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c > > index

Re: [PATCH] PR fortran/103411 - ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377

2021-11-25 Thread Mikael Morin
Le 25/11/2021 à 21:03, Harald Anlauf a écrit : Hi Mikael, Am 25.11.21 um 17:46 schrieb Mikael Morin: Hello, Le 24/11/2021 à 22:32, Harald Anlauf via Fortran a écrit : diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 5a5aca10ebe..837eb0912c0 100644 --- a/gcc/fortran/check.c +++

[Bug middle-end/103393] [12 Regression] Generating 256bit register usage with -mprefer-avx128 -mprefer-vector-width=128

2021-11-25 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103393 --- Comment #13 from Richard Earnshaw --- Also, note that the comment in gimple-fold.c prior to this change read: /* If we can perform the copy efficiently with first doing all loads and then all stores inline it that way.

[Bug middle-end/103393] [12 Regression] Generating 256bit register usage with -mprefer-avx128 -mprefer-vector-width=128

2021-11-25 Thread rearnsha at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103393 --- Comment #12 from Richard Earnshaw --- (In reply to Jakub Jelinek from comment #10) > Alternatively, couldn't we check next to that new > && have_insn_for (SET, mode) > also that > && known_le (GET_MODE_SIZE

Re: [PATCH 4/4] libgcc: Use _dl_find_eh_frame in _Unwind_Find_FDE

2021-11-25 Thread Florian Weimer via Gcc-patches
* Jakub Jelinek: >> +/* Fallback declaration for old glibc headers. DL_FIND_EH_FRAME_DBASE is >> used >> + as a proxy to determine if declares _dl_find_eh_frame. */ >> +#if defined __GLIBC__ && !defined DL_FIND_EH_FRAME_DBASE >> +#if NEED_DBASE_MEMBER >> +void *_dl_find_eh_frame (void

[PATCH v2] elf: Add _dl_find_object function

2021-11-25 Thread Florian Weimer via Gcc-patches
I have reword the previous patch to make the interface more generally useful. Since there are now four words in the core arrays, I did away with the separate base address array. (We can bring it back in the future if necessary.) I fixed a bug in the handling of proxy map (by not copying proxy

[Bug middle-end/103406] gcc -O0 behaves differently on "DBL_MAX related operations" than gcc -O1 and above

2021-11-25 Thread joseph at codesourcery dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103406 --- Comment #14 from joseph at codesourcery dot com --- There is no reasonable definition of how operands of binary + map to particular operands of a particular instruction and so no -f or -m option could sensibly be defined for that. When

[Bug tree-optimization/99520] Failure to detect bswap pattern

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99520 Roger Sayle changed: What|Removed |Added Target Milestone|--- |12.0 CC|

[Bug tree-optimization/98953] Failure to optimize two reads from adjacent addresses into one

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98953 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|roger at

[committed] libstdc++: Do not use memset in constexpr calls to ranges::fill_n [PR101608]

2021-11-25 Thread Jonathan Wakely via Gcc-patches
Tested x86_64-linux, pushed to trunk. libstdc++-v3/ChangeLog: PR libstdc++/101608 * include/bits/ranges_algobase.h (__fill_n_fn): Check for constant evaluation before using memset. * testsuite/25_algorithms/fill_n/constrained.cc: Check byte-sized values

[Bug libstdc++/101608] ranges::fill/fill_n missing std::is_constant_evaluated() condition for __builtin_memset

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101608 --- Comment #2 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:82c3657dd74896b39937bb0a2aaeba9b8ca105fd commit r12-5530-g82c3657dd74896b39937bb0a2aaeba9b8ca105fd Author: Jonathan Wakely

Re: [PATCH] PR fortran/103411 - ICE in gfc_conv_array_initializer, at fortran/trans-array.c:6377

2021-11-25 Thread Harald Anlauf via Gcc-patches
Hi Mikael, Am 25.11.21 um 17:46 schrieb Mikael Morin: Hello, Le 24/11/2021 à 22:32, Harald Anlauf via Fortran a écrit : diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c index 5a5aca10ebe..837eb0912c0 100644 --- a/gcc/fortran/check.c +++ b/gcc/fortran/check.c @@ -4866,10 +4868,17 @@

[Bug tree-optimization/103345] missed optimization: add/xor individual bytes to form a word

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103345 Roger Sayle changed: What|Removed |Added Target Milestone|--- |12.0 Status|ASSIGNED

[Bug middle-end/103406] gcc -O0 behaves differently on "DBL_MAX related operations" than gcc -O1 and above

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103406 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|roger at

[Bug c++/56119] Allows static member definition of template class in namespace not enclosing this class

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56119 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/103426] Acceptance of invalid template specialization in a namespace not enclosing the specialized template

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103426 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/103427] Alignment of C++ references and 'this' pointer not used by optimizer

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103427 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-11-25 Ever confirmed|0

[Bug tree-optimization/103332] Spurious -Wstringop-overflow warnings in libstdc++ tests

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103332 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug target/102117] s390: Inefficient code for 64x64=128 signed multiply for <= z13

2021-11-25 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102117 Roger Sayle changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/102958] std::u8string suboptimal compared to std::string, triggers warnings

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102958 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2021-11-25

[Bug middle-end/103406] [12 Regression] gcc -O0 behaves differently on "DBL_MAX related operations" than gcc -O1 and above

2021-11-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103406 --- Comment #12 from CVS Commits --- The master branch has been updated by Roger Sayle : https://gcc.gnu.org/g:6ea5fb3cc7f3cc9b731d72183c66c23543876f5a commit r12-5529-g6ea5fb3cc7f3cc9b731d72183c66c23543876f5a Author: Roger Sayle Date: Thu

[Bug tree-optimization/103429] Optimization of Auto-generated condition chain is not giving good lookup tables.

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103429 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug c++/102454] coroutines: ICE in gimplify_var_or_parm_decl, at gimplify.c:2958

2021-11-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102454 --- Comment #7 from Iain Sandoe --- I was leaving it to check if we needed to back port to 10.x as well.

[Bug c++/102213] Incorrect executable produced from valid input code with virtual consteval

2021-11-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102213 --- Comment #2 from Andrew Pinski --- Note GCC 10 did a sorry message: sorry, unimplemented: 'virtual' 'consteval'

  1   2   3   >