[Bug target/115084] Missed optimization in division for AVR target, not using __*divmodpsi4

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115084 --- Comment #1 from Andrew Pinski --- There is another bug dealing with division and truncation that was just filed. It is a generic (non-avr) issue.

[Bug target/115084] Missed optimization in division for AVR target, not using __*divmodpsi4

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115084 Andrew Pinski changed: What|Removed |Added Component|c |target Keywords|

[Bug tree-optimization/111487] (a OP CST1) & (a == CST0) could be simplified down to (CST OP CST1) & (a == CST0)

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111487 --- Comment #3 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > Thinking about how to handle binary operators. Here are some rules I came up > with when we should prop the constant: I should note when I tested llvm, it does

[Bug tree-optimization/111487] (a OP CST1) & (a == CST0) could be simplified down to (CST OP CST1) & (a == CST0)

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111487 --- Comment #2 from Andrew Pinski --- Thinking about how to handle binary operators. Here are some rules I came up with when we should prop the constant: * constants for the other operand (will reduce to a constant) * plus if it is used once

[Bug tree-optimization/115082] New: Canonical form for `(a+oddCST)&1` or `1 & ~a`

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115082 Bug ID: 115082 Summary: Canonical form for `(a+oddCST)&1` or `1 & ~a` Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement

[Bug rtl-optimization/115081] find thie PR will cause ICE: Modify cost calculation for dealingf with equivalaennces

2024-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115081 --- Comment #3 from Andrew Pinski --- You have not provided all of the information needed for this? Can you provide the target which is being used here? Can you provide the exact version of GCC you are using to get the ICE? Also I noticed the

[Bug rtl-optimization/115081] find thie PR will cause ICE: Modify cost calculation for dealingf with equivalaennces

2024-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115081 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2024-05-14

[Bug rtl-optimization/115081] find thie PR will cause ICE: Modify cost calculation for dealingf with equivalaennces

2024-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115081 Andrew Pinski changed: What|Removed |Added Component|c |rtl-optimization --- Comment #1 from

[Bug target/115058] on target arm -mcpu=cortex-a78ae does not allow use pauth and dot product

2024-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115058 --- Comment #3 from Andrew Pinski --- This looks like a binutils issue rather a gcc one. It might be already fixed in binutils too.

[Bug tree-optimization/115073] RISC-V: Gimple fold not honor C[LT]Z_DEFINED_VALUE_AT_ZERO

2024-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115073 --- Comment #4 from Andrew Pinski --- Note -fsanitize=undefined does detect this undefinedness at runtime already too.

[Bug tree-optimization/115073] RISC-V: Gimple fold not honor C[LT]Z_DEFINED_VALUE_AT_ZERO

2024-05-13 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115073 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug tree-optimization/115055] New: reassociation should use match-and-simplify

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115055 Bug ID: 115055 Summary: reassociation should use match-and-simplify Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement

[Bug target/115054] __float128 and _Float16 use incorrect ABI on x86-64 MinGW

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054 --- Comment #3 from Andrew Pinski --- https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170#parameter-passing So it uses floating point as the type. But then it is vague on those kind of type. Gcc treats _Float16

[Bug target/115054] __float128 and _Float16 use incorrect ABI on x86-64 MinGW

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054 --- Comment #2 from Andrew Pinski --- Does Microsoft's abi documents this case? If not then gcc is as correct here as clang is.

[Bug target/115054] __float128 and _Float16 use incorrect ABI on x86-64 MinGW

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054 --- Comment #1 from Andrew Pinski --- What does msvc do?

[Bug rtl-optimization/115051] ICE: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 with -O -finstrument-functions-once -finline-stringops -fprofile-use

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115051 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug middle-end/113506] ICE: RTL check: expected elt 2 type 'B', have '0' (rtx barrier) in BLOCK_FOR_INSN, at rtl.h:1495 with -Os -fno-tree-coalesce-vars -finline-stringops

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113506 --- Comment #1 from Andrew Pinski --- *** Bug 115051 has been marked as a duplicate of this bug. ***

[Bug c++/115050] Segfault when compiled with -O0

2024-05-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115050 --- Comment #1 from Andrew Pinski --- Note there is an alignment missing on the data field.

[Bug target/113882] V4SF->V4HI could be implemented using V4SF->V4SI and then truncation to V4HI

2024-05-11 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113882 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Assignee|unassigned at gcc

[Bug target/113880] V2SF->V2DF conversion pattern seems to be missing

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

[Bug libstdc++/115040] Missed optimization opportunity in std::find of std::vector elements

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115040 --- Comment #4 from Andrew Pinski --- (In reply to Sam James from comment #3) > (In reply to Andrew Pinski from comment #2) > > > clang lowers both the calls to (w)memchr > > > > Is that with libc++ or libstdc++? > > It's libc++. Checked

[Bug tree-optimization/115040] Missed optimization opportunity in std::find of std::vector elements

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115040 --- Comment #2 from Andrew Pinski --- > clang lowers both the calls to (w)memchr Is that with libc++ or libstdc++?

[Bug tree-optimization/115040] Missed optimization opportunity in std::find of std::vector elements

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115040 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug middle-end/115037] Unused std::vector is not optimized away.

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115037 --- Comment #4 from Andrew Pinski --- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94293#c4

[Bug middle-end/115037] Unused std::vector is not optimized away.

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115037 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug middle-end/115037] Unused std::vector is not optimized away.

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115037 --- Comment #1 from Andrew Pinski --- This might be a dup of another bug which talks about the same thing.

[Bug tree-optimization/115033] Incorrect optimization of by-reference closure fields by fre1 pass

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115033 Andrew Pinski changed: What|Removed |Added Ever confirmed|1 |0 Status|WAITING

[Bug tree-optimization/115034] Missed optimization: reduntant store of identical value in the slot

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115034 --- Comment #1 from Andrew Pinski --- Note there is some memory model requirements here that I always forget if this can happen or not.

[Bug tree-optimization/115033] Incorrect optimization of by-reference closure fields by fre1 pass

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115033 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2024-05-10

[Bug target/115014] GCC generates incorrect instructions for addressing the data segment through EBP register

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115014 --- Comment #10 from Andrew Pinski --- int f(int *a) { int b; size_t t = (size_t) size_t t1 = (size_t)a; return *(int*)(((size_t))+(t-t1)); } Is kinda of valid c but might fail with your definition.

[Bug target/115014] GCC generates incorrect instructions for addressing the data segment through EBP register

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115014 --- Comment #8 from Andrew Pinski --- I didn't misunderstanding it. I just think it is not a valid request. Especially when it comes to it is only this special kvm kernel. Someone in theory could also use an offset from esp and run into a

[Bug c/115023] __builtin_assoc_barrier does not talk about contracting even though it prevents it too

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115023 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug c/115023] New: __builtin_assoc_barrier does not talk about contracting even though it prevents it too

2024-05-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115023 Bug ID: 115023 Summary: __builtin_assoc_barrier does not talk about contracting even though it prevents it too Product: gcc Version: 15.0 Status: UNCONFIRMED

[Bug middle-end/115022] -fstrub=disable and -minline-memops-threshold have a - in the index

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115022 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

[Bug middle-end/115022] New: -fstrub=disable and -minline-memops-threshold have a - in the index

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115022 Bug ID: 115022 Summary: -fstrub=disable and -minline-memops-threshold have a - in the index Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords:

[Bug target/114528] (0xFFFFFFFF0001FFFFULL - 0x00123000) constant forming could be done in 2 instructions

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114528 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org ---

[Bug c/115019] wraparound bug with with -O3 and int128

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115019 --- Comment #3 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > /app/example.cpp:36:24: runtime error: negation of > 0x8000 cannot be represented in type '__int128'; > cast to an unsigned type to

[Bug c/115019] wraparound bug with with -O3 and int128

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115019 --- Comment #2 from Andrew Pinski --- /app/example.cpp:36:24: runtime error: negation of 0x8000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself

[Bug c/115019] wraparound bug with with -O3 and int128

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115019 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 --- Comment #12 from Andrew Pinski --- (In reply to Aldy Hernandez from comment #10) > I can test my proposed patch on a cross for avr, but for this testcase on > rl78-none and rl78-elf, I get: That was not a testcase but rather a copy of the

[Bug target/115018] Incorrect data read/written at -O3 on aarch64 with 256-bit SVE SIMD width specified

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

[Bug target/115018] Incorrect data read/written at -O3 on aarch64 with 256-bit SVE SIMD width specified

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115018 --- Comment #1 from Andrew Pinski --- First I can't reproduce it with the official releases GCC 13.2.0. Second with the trunk, I am not sure if this is a bug or not. With the trunk with `-O3 -Wall -Wextra -fno-strict-aliasing -fwrapv

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 --- Comment #7 from Andrew Pinski --- For rl78: static scalar_int_mode rl78_addr_space_address_mode (addr_space_t addrspace) { switch (addrspace) { case ADDR_SPACE_GENERIC: return HImode; case ADDR_SPACE_NEAR: return

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 --- Comment #6 from Andrew Pinski --- rl78 has __far which is a 32bit pointer (the normal ptr size there is 16bit).

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 Andrew Pinski changed: What|Removed |Added CC||law at gcc dot gnu.org --- Comment #4

[Bug tree-optimization/115017] [15 Regression] Ranger ICE

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115017 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE

[Bug tree-optimization/112659] missed-optimization: if (exp) return exp; else return 0;

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112659 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #8) > Thinking about this slightly more, we should be able to handle (which LLVM > does not currently handles): > ``` > int optb(int v, int b) { > // b = 8; >

[Bug target/113859] popcount HI can be vectorized for non-SVE

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113859 Andrew Pinski changed: What|Removed |Added Keywords||patch URL|

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 Andrew Pinski changed: What|Removed |Added Severity|normal |blocker CC|

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 --- Comment #2 from Andrew Pinski --- Reduced testcase: ``` void pgm_copystring(const char __memx * p) { unsigned char c; c = *p; } ```

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

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

[Bug tree-optimization/115004] [11/12/13/14/15 Regression] Missed optimization for Dead Code Elimination

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115004 --- Comment #1 from Andrew Pinski --- Note this works with the IR coming out of the C front-end but NOT the IR coming out from the C++ front-end. Yes the front-ends are different.

[Bug target/115010] m68k: invalid subl instruction generated

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115010 Andrew Pinski changed: What|Removed |Added Status|WAITING |UNCONFIRMED Ever confirmed|1

[Bug tree-optimization/115005] [gcc-13] bogus -Warray-bounds warning

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115005 --- Comment #2 from Andrew Pinski --- Folding statement: _336 = cmd_8bits[numbits_181]; Folded into: _336 = cmd_8bits[4294967295]; Which comes from: uint32 d = get_bits(in, numbits+1, ); if (d >=

[Bug target/115010] m68k: invalid subl instruction generated

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115010 Andrew Pinski changed: What|Removed |Added Target||m68k-linux-gnu

[Bug rtl-optimization/115013] [15 Regression] LRA: PR114810 fix result in ICE in the RISC-V Vector

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115013 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0 Component|c

[Bug target/115014] GCC generates incorrect instructions for addressing the data segment through EBP register

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115014 --- Comment #3 from Andrew Pinski --- (In reply to Martin Doucha from comment #2) > > This is certainly not wanted in the most common case where the flat memory > assumption is correct. But it should be used for compiling embedded binaries >

[Bug target/115014] GCC generates incorrect instructions for addressing the data segment through EBP register

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

[Bug tree-optimization/115009] [15 regression] AVR: ICE in alloc, at value-range-storage.cc:598

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115009 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org Target

[Bug tree-optimization/104292] (bool)(bool0 + bool1) should be simplified into bool0 | bool1

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104292 --- Comment #5 from Andrew Pinski --- Note LLVM started to do this "trick" in 17.1.0.

[Bug tree-optimization/115011] [14/15 Regression] Missed optimization: (bool) (f ? 1: t) ==> 1 when bool t = (0 >= f) + x;

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115011 --- Comment #4 from Andrew Pinski --- So depends on PR 104292.

[Bug tree-optimization/115011] [14/15 Regression] Missed optimization: (bool) (f ? 1: t) ==> 1 when bool t = (0 >= f) + x;

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115011 Andrew Pinski changed: What|Removed |Added Depends on||104292 --- Comment #3 from Andrew

[Bug tree-optimization/115011] [14/15 Regression] Missed optimization: (bool) (f ? 1: t) ==> 1 when bool t = (0 >= f) + x;

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115011 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2024-05-09 00:00:00 | Status|NEW

[Bug tree-optimization/114998] [14/15 Regression] ICE on valid code at -O3 with "-fno-tree-dce" on x86_64-linux-gnu: Segmentation fault

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114998 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Summary|ICE on valid

[Bug tree-optimization/110386] [11/12 Regression] ICE with ABSU in backprop

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110386 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work|

[Bug c++/114997] [11/12 Only] ICE: unexpected expression ‘static_cast('\"')’ of kind static_cast_expr

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114997 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.5 Summary|ICE:

[Bug c++/114997] ICE: unexpected expression ‘static_cast('\"')’ of kind static_cast_expr

2024-05-09 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114997 --- Comment #4 from Andrew Pinski --- My reduced testcase has failed since 4.8.0 and started to pass in GCC 13.1.0. I wonder what fixed it (I suspect r13-3438 and if so I doubt that can be backported). Note the issue is with constexpr and

[Bug c++/114997] ICE with -std=c++20: unexpected expression ‘static_cast('\"')’ of kind static_cast_expr

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114997 --- Comment #3 from Andrew Pinski --- Reduced testcase: ``` typedef int vv __attribute__((__vector_size__(sizeof(int; constexpr vv ff(int code) { return vv{code}; } template struct h { typedef _Tp type; }; template void f() {

[Bug c++/115000] Confusing 'cannot convert to 'int' in initialization' error message

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115000 --- Comment #3 from Andrew Pinski --- I suspect all of the see also bugs here are the same issue, I described my try of fixing that in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104113#c8 .

[Bug c++/115000] Confusing 'cannot convert to 'int' in initialization' error message

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115000 --- Comment #2 from Andrew Pinski --- Reduced: ``` template concept bool c = false; template struct ts{}; struct S {}; S s; ts t33{s}; ```

[Bug c++/115000] Confusing 'cannot convert to 'int' in initialization' error message

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

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 --- Comment #5 from Andrew Pinski --- The following patterns could be improved/removed while doing this: ``` /* (A - B) == 0 ? (A - B) : (B - A)same as (B - A) */ /* (A - B) != 0 ? (A - B) : (B - A)same as (A - B) */ /* (A - B) >=/>

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 Andrew Pinski changed: What|Removed |Added Blocks||113265 --- Comment #4 from Andrew

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 --- Comment #3 from Andrew Pinski --- (In reply to Andrew Pinski from comment #2) > Another one: > ``` > int f(int a, int b, int x) > { > x = a - b; > int y = -x; > return (x >= 0 ? x : 0) + (x <= 0 ? y : 0); > } > ``` > > This should be

[Bug tree-optimization/114999] A few missing optimizations due to `a - b` and `b - a` not being detected as negatives of each other

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 Andrew Pinski changed: What|Removed |Added Summary|`a - b == b - a` -> `a == |A few missing optimizations

[Bug tree-optimization/114999] `a - b == b - a` -> `a == b`

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0

[Bug tree-optimization/114999] New: `a - b == b - a` -> `a == b`

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114999 Bug ID: 114999 Summary: `a - b == b - a` -> `a == b` Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement

[Bug tree-optimization/112659] missed-optimization: if (exp) return exp; else return 0;

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112659 --- Comment #8 from Andrew Pinski --- (In reply to Andrew Pinski from comment #7) > This is the pattern I added for the plus case: > ``` > (for cnd (cond vec_cond) > ... > /* (a != CST1) ? (a + CST2) : 0 -> (a + CST2) iff CST1 == -CST2 */ >

[Bug c++/114992] [13/14/15 Regression] ICE during IPA pass: targetclone in add_to_same_comdat_group with calling a target clone with a lamdba in a comdat function

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114992 Andrew Pinski changed: What|Removed |Added Summary|ICE during IPA pass:|[13/14/15 Regression] ICE

[Bug c++/114994] [14/15 Regression] fmtlib named argument compiler error introduced in g++-14.1

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114994 Andrew Pinski changed: What|Removed |Added Summary|fmtlib named argument |[14/15 Regression] fmtlib

[Bug tree-optimization/114995] C++23 Assume keyword not being used for vectorization

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Keywords|

[Bug tree-optimization/114995] C++23 Assume keyword not being used for vectorization

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995 --- Comment #4 from Andrew Pinski --- Oh this is the more correct syntax: [[assume((uintptr_t(x_array) & (32-1)) == 0)]]; [[assume((uintptr_t(mul_array) & (32-1)) == 0)]]; [[assume((uintptr_t(add_array) & (32-1)) == 0)]];

[Bug tree-optimization/114995] C++23 Assume keyword not being used for vectorization

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995 --- Comment #2 from Andrew Pinski --- I suspect the syntax you want instead is: [[assume(uintptr_t(x_array) & (32-1) == 0]]; Becuase __builtin_assume_aligned takes a pointer and returns a pointer that has the assumed alignment

[Bug tree-optimization/114995] C++23 Assume keyword not being used for vectorization

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114995 --- Comment #1 from Andrew Pinski --- Created attachment 58135 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58135=edit testcase

[Bug c++/114994] fmtlib named argument compiler error introduced in g++-14.1

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114994 --- Comment #3 from Andrew Pinski --- Trying my hand at reducing this slightly.

[Bug c++/114994] fmtlib named argument compiler error introduced in g++-14.1

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114994 --- Comment #2 from Andrew Pinski --- Note lambdas is not need can happen in any template function: ``` #include #define FMT_HEADER_ONLY #include using namespace fmt::literals; template auto test(int a) { return fmt::format("{foo}

[Bug tree-optimization/114872] [13/14/15 Regression] Miscompilation with -O2 after commit r13-8037

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114872 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED See Also|

[Bug tree-optimization/109804] [11 Regression] internal compiler error in gimple-ssa-warn-access.cc

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109804 Andrew Pinski changed: What|Removed |Added Summary|[11/12 Regression] internal |[11 Regression] internal

[Bug ipa/114985] [15 regression] internal compiler error: in discriminator_fail during stage2

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114985 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |15.0 Keywords|

[Bug middle-end/114989] Compile time hog when building paml

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114989 --- Comment #2 from Andrew Pinski --- (In reply to Andrew Pinski from comment #1) > So expand is usually fast. The only slow part I know of that might be > hitting here is division by constant where we are trying to find if it is > better to

[Bug middle-end/114989] Compile time hog when building paml

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114989 Andrew Pinski changed: What|Removed |Added Component|c |middle-end Keywords|

[Bug tree-optimization/111331] [11/12 Regression] Wrong code at -O1 on x86_64-linux-gnu since

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111331 Andrew Pinski changed: What|Removed |Added Known to work||12.3.1 Resolution|---

[Bug middle-end/95351] [11/12 Regression] Comparison with NAN optimizes incorrectly with -ffast-math disabled

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95351 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work|

[Bug target/109762] [12 Regression] gcc/config/aarch64/aarch64-builtins.cc: mismatched sizes for flags variables

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109762 --- Comment #11 from Andrew Pinski --- The patch does not apply directly to GCC 12.

[Bug target/110066] [13 Regression] [RISC-V] Segment fault if compiled with -static -pg

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110066 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/112392] `a == nonnegative ? a : abs` -> abs

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112392 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|---

[Bug tree-optimization/112659] missed-optimization: if (exp) return exp; else return 0;

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112659 --- Comment #7 from Andrew Pinski --- This is the pattern I added for the plus case: ``` (for cnd (cond vec_cond) ... /* (a != CST1) ? (a + CST2) : 0 -> (a + CST2) iff CST1 == -CST2 */ (simplify (cnd (ne @0 uniform_integer_cst_p@1)

[Bug tree-optimization/112659] missed-optimization: if (exp) return exp; else return 0;

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112659 --- Comment #6 from Andrew Pinski --- Vector testcase (C++ only) for the missing add case: ``` #define vector4 __attribute__((vector_size(4*sizeof(int void unopt(vector4 int *v) { vector4 int t = *v; vector4 int t1 = t + 8; *v

[Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114982 --- Comment #3 from Andrew Pinski --- Looks like the testcase should also be skipped for mingw/cygwin too. ``` /* External public symbols, which aren't weakref-s, have local-binding for PE targets. */ if (DECL_P (exp) &&

[Bug testsuite/114982] New test g++.dg/tree-ssa/cxa_atexit-6.C fails on Darwin.

2024-05-08 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114982 --- Comment #2 from Andrew Pinski --- So I was going for the elf semantics here but Mach-O semantics says the function is NOT replacable unless it was weak. Anyways this is just a dg-skip-if for darwin and I will add it with a note saying

<    3   4   5   6   7   8   9   10   11   12   >