[Bug rtl-optimization/40361] Conditional return not always profitable with -Os

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40361 --- Comment #2 from Andrew Pinski --- So the cross jumping opportunity since at least 5.4 even with a conditional return. ldr r3, .L8 stmfd sp!, {r4, lr} ldr r3, [r3] ldr r4, .L8+4 cmp r3

[Bug target/39821] 120% slowdown with vectorizer

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39821 Andrew Pinski changed: What|Removed |Added Component|tree-optimization |target --- Comment #5 from Andrew Pinski

[Bug c++/101622] New: Type erasure (upcasting) in constexpr/consteval context

2021-07-25 Thread sjeltsch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101622 Bug ID: 101622 Summary: Type erasure (upcasting) in constexpr/consteval context Product: gcc Version: 10.2.1 Status: UNCONFIRMED Severity: normal Pri

[Bug tree-optimization/40170] redundant zero extensions

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40170 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0 Resolution|---

[Bug tree-optimization/101621] gcc cannot optimize int8_t vector assign with subscription to shuffle

2021-07-25 Thread yumeyao at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101621 --- Comment #3 from YumeYao --- (In reply to Andrew Pinski from comment #2) > The cast issue is because in GCC 9, it was not producing PERM at the gimple > level which was fixed correctly in GCC 11. > > clang_shuffle_with_zero can easy be added

[Bug target/48986] Missed optimization in atomic decrement on x86/x64

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48986 Andrew Pinski changed: What|Removed |Added CC||bcrl at kvack dot org --- Comment #7 fro

[Bug target/25230] __sync_add_and_fetch does not use condition flags from subl

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

[Bug tree-optimization/32226] Missed optimization caused by copy loop header (yes a weird case)

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32226 --- Comment #3 from Andrew Pinski --- To do this optimization (the reduced testcase works right now), you have to simulate each statement until the end with "width_5 == 0" (the opposite range of the initial condition) to see if get the other phi

[Bug tree-optimization/30099] missed value numbering optimization (conditional-based assertions)

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

[Bug tree-optimization/39761] data-flow analysis does not discover constant real/imaginary parts

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39761 --- Comment #14 from Andrew Pinski --- (In reply to Andrew Pinski from comment #13) > Fixed in GCC 8, most likely by r8-5346 . That is DOM is now able to do the > jump threading even at -Os. I should say DOM is doing the jump threading now whic

[Bug tree-optimization/39761] data-flow analysis does not discover constant real/imaginary parts

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

[Bug tree-optimization/37810] Bad store sinking job

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37810 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2009-04-03 12:34:44 |2021-7-25 --- Comment #6 from Andrew Pin

[Bug rtl-optimization/35309] Late struct expansion leads to missing PRE

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35309 --- Comment #3 from Andrew Pinski --- THe original testcase in comment #0 is now fixed but the following is not: struct A { int f[16]; } ag, ag2,ag3; struct A foo(int n) { if (n) { ag2 = ag; } return ag; }

[Bug target/23813] redundant register assignments not eliminated

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

[Bug tree-optimization/23855] loop header should also be pulled out of the inner loop too

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

[Bug tree-optimization/35344] Loop unswitching to produce perfect loop nest

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

[Bug target/28919] IV selection is messed up

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28919 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2006-09-17 22:48:12 |2021-7-25 --- Comment #10 from Andrew Pi

[Bug target/18562] SSE constant vector initialization produces dead constant values on stack

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18562 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |4.9.0 Resolution|---

[Bug tree-optimization/21712] missed optimization due with const function and pulling out of loops

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21712 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug tree-optimization/101621] gcc cannot optimize int8_t vector assign with subscription to shuffle

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

[Bug target/19922] xor is enclosed in loop, and exectuted on each iteration of for statement

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19922 --- Comment #7 from Andrew Pinski --- So the question becomes do we care about this look if -fno-tree-loop-distribute-patterns is added? Anyways we are able to detect the loop is a memset for a while now and then expand that to have no xor ins

[Bug tree-optimization/101621] gcc cannot optimize int8_t vector assign with subscription to shuffle

2021-07-25 Thread yumeyao at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101621 --- Comment #1 from YumeYao --- https://gcc.godbolt.org/z/a47Enb9oK 16-bytes (AVX) version added.

[Bug target/18233] extraneous inc/dec pair

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18233 Andrew Pinski changed: What|Removed |Added Depends on||94956 Resolution|---

[Bug tree-optimization/101621] New: gcc cannot optimize int8_t vector assign with subscription to shuffle

2021-07-25 Thread yumeyao at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101621 Bug ID: 101621 Summary: gcc cannot optimize int8_t vector assign with subscription to shuffle Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal

[Bug target/101614] [s390] vec_signed requires z15, docs say z13

2021-07-25 Thread evan--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101614 Evan Nemerson changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 --- Comment #7 from Andrew Pinski --- A few more canonicalization issues that need to be thought of: "a >>u (bitsize-1)" and "a >s (bitsize-1)" and "-(a Thinking about this some more, there is a canonicalization issue. We need to > decide if w

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 --- Comment #6 from Andrew Pinski --- Thinking about this some more, there is a canonicalization issue. We need to decide if we want to canonicalization to just a ? -1 : 1; or expand it out. a ? 1 : 0 makes sense to do (cast) a; So does "a ? 0

[Bug d/101490] ICE at convert_expr(tree_node*, Type*, Type*)

2021-07-25 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101490 --- Comment #1 from Iain Buclaw --- Reduced test --- struct test { int[0] foo; } void main() { test* t; auto a = cast(typeof(t.foo)[0])t.foo; write(a); } void write(S)(S args) { foreach (arg; args) { } }

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 Andrew Pinski changed: What|Removed |Added Attachment #51203|0 |1 is obsolete|

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 --- Comment #4 from Andrew Pinski --- Created attachment 51203 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51203&action=edit ifcvt patch Patch which go into testing.

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 --- Comment #3 from Andrew Pinski --- I have the ifcvt.c patch which adds this.

[Bug d/101441] __FUNCTION__ doesn't work in core.stdc.stdio functions without cast

2021-07-25 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101441 --- Comment #1 from Iain Buclaw --- Upstream dmd fixed bug much later than 2.076. https://github.com/dlang/dmd/pull/9920

[Bug rtl-optimization/67382] RTL combiner is too eager to combine (plus (reg 92) (reg 92)) to (ashift (reg 92) (const_int 1))

2021-07-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67382 --- Comment #5 from Segher Boessenkool --- It turns out that noop other_insn is fine, and is accepted etc., but the resulting i3 in this case is not.

[Bug rtl-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 Andrew Pinski changed: What|Removed |Added Component|tree-optimization |rtl-optimization --- Comment #2 from An

[Bug c++/101620] New: gcc incorrectly makes concept checking in incomplete-class context

2021-07-25 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101620 Bug ID: 101620 Summary: gcc incorrectly makes concept checking in incomplete-class context Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal

[Bug c++/52099] Incorrectly applying conversion when catching pointer-to-members

2021-07-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52099 --- Comment #2 from Jonathan Wakely --- >From the dup: Eric Fiselier 2016-01-20 03:50:56 UTC Created attachment 37399 [details] reproducer I don't see where [except.handle] allows such a conversion. Comment 1 Jonathan Wakely 2017-01-13 20:3

[Bug rtl-optimization/67382] RTL combiner is too eager to combine (plus (reg 92) (reg 92)) to (ashift (reg 92) (const_int 1))

2021-07-25 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67382 --- Comment #4 from Segher Boessenkool --- (In reply to Andrew Pinski from comment #3) > Note combine is able to figure out the jump is unconditional but there is no > "pattern" to match it: > Trying 10 -> 17: >10: r85:QI=0x1 >17: {flags:

[Bug tree-optimization/101617] a ? -1 : 1 -> (-(type)a) | 1

2021-07-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101617 --- Comment #1 from Andrew Pinski --- So it turns out you can make this generic and don't need to handle 1 specially diff --git a/gcc/match.pd b/gcc/match.pd index beb8d27535e..2af987278af 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -3805,14

[Bug fortran/92482] BIND(C) with array-descriptor mishandled for type character

2021-07-25 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92482 sandra at gcc dot gnu.org changed: What|Removed |Added CC||sandra at gcc dot gnu.org ---

[Bug d/101619] New: d: Change in DotTemplateExp type semantics leading to regression

2021-07-25 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101619 Bug ID: 101619 Summary: d: Change in DotTemplateExp type semantics leading to regression Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal

[Bug bootstrap/100552] [11/12 Regression] configure: 32208: Syntax error: Bad substitution

2021-07-25 Thread ibuclaw at gdcproject dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100552 Iain Buclaw changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug sanitizer/101111] xgcc cross-compiler for x86_64-apple-darwin in GCC 11.1 doesn't generate weak symbols, resulting in undefined reference to ___lsan_default_suppressions

2021-07-25 Thread mose at gnu dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10 --- Comment #11 from Mosè Giordano --- > This is OK for master and back-ports from the Darwin perspective Thanks for the review and confirmation! > (I guess Martin plans to deal with this since he has assigned the PR, but if > he does not hav

[Bug sanitizer/101111] xgcc cross-compiler for x86_64-apple-darwin in GCC 11.1 doesn't generate weak symbols, resulting in undefined reference to ___lsan_default_suppressions

2021-07-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10 --- Comment #10 from Iain Sandoe --- (In reply to Mosè Giordano from comment #6) > Created attachment 51038 [details] > Patch to fix the reported issue > > Please find attached a patch to fix the reported issue. I replaced the > bashism += wit

[Bug gcov-profile/101618] New: [GCOV] Wrong coverage caused by call site in a "for" statement

2021-07-25 Thread njuwy at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101618 Bug ID: 101618 Summary: [GCOV] Wrong coverage caused by call site in a "for" statement Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal

[Bug objc/101616] Objective-C frontend should not emit vtable/fixup messages (at least, not by default)

2021-07-25 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101616 Iain Sandoe changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---