[Bug tree-optimization/86701] New: Optimize strlen called on std::string c_str()

2018-07-27 Thread david.bolvansky at gmail dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Transform: int lenstr(std::string ) { return strlen(str.c_str() /* .data() */); } To: int lenstr(std::string ) { return str.length(); }

[Bug tree-optimization/86701] Optimize strlen called on std::string c_str()

2018-07-27 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86701 --- Comment #2 from Dávid Bolvanský --- There is not string analysis to tell us that string has no null characters in the middle?

[Bug c/86628] New: Missed simplification of division

2018-07-22 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Hello, for code: int f(int x, int y, int z) { return (x * y * z) / (y * z); } GCC 8.1 (x86-64) with -O3 emits: f(int, int, int): mov eax, edi imul eax, esi imul esi, edx

[Bug tree-optimization/86628] Missed simplification of division

2018-07-22 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86628 --- Comment #2 from Dávid Bolvanský --- Something/0 is undefined behaviour

[Bug c++/87234] New: GCC should warn if template parameter redefines default argument

2018-09-05 Thread david.bolvansky at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- -O3 -Wall -Werror -std=c++17 template< typename T = int > T func( ); template< typename T = int > T func( ) { } No war

[Bug c++/87230] New: GCC should warn if [[fallthrough]] is used in the last case in a switch

2018-09-05 Thread david.bolvansky at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- void f(int n) { void g(), h(), i(); switch (n) { case 1: case 2: g(); [[fallthrough]]; case 3

[Bug tree-optimization/87465] New: Loop removal regression

2018-09-28 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- void Test() { int c = 0; int in[4] = {4,3,4,4}; for (unsigned i = 0; i < 4; i++) { for (unsigned j = 0; j < i; j++) { if (in[i] =

[Bug tree-optimization/87540] New: Missed inner loop hoist if the loop does not depend on outer loop

2018-10-06 Thread david.bolvansky at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Not sure how often this happens in the real world apps but anyway idea is.. int foo(void) { double *array

[Bug c++/88637] New: GCC should mention C++17 in warnings, not C++1z

2018-12-30 Thread david.bolvansky at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- GCC 8.2 Ubuntu build Code from: http://coliru.stacked-crooked.com/a/d59814e0765c3499 g++ -O3 file.cpp Now: warning: pack expansion in using-declaration only

[Bug c/89526] New: Diagnose errors in asserts

2019-02-27 Thread david.bolvansky at gmail dot com
: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- GCC trunk -Wall -Wextra #include int foo(int *x) { assert(x && "nullptr"); return *x; } int foo2(int *x) { assert("nullptr"); // should warn return *x; }

[Bug c++/89554] New: Incorrect location of warning

2019-03-01 Thread david.bolvansky at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Found when building LLVM trunk with GCC 9 trunk (built today) compiler. https://clang.llvm.org/doxygen/LiteralSupport_8cpp_source.html const char *End = saw_exponent ? ExponentBegin

[Bug c++/89554] Incorrect location of warning

2019-03-02 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89554 --- Comment #1 from Dávid Bolvanský --- Another weird report: Building CXX object lib/Lex/CMakeFiles/clangLex.dir/PPMacroExpansion.cpp.o In file included from /home/xbolva00/LLVM/llvm-project/clang/include/clang/Basic/SourceManager.h:37:0,

[Bug tree-optimization/89491] Inline jump tables

2019-02-25 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89491 --- Comment #2 from Dávid Bolvanský --- Right, static helps. What about more complex examples, like inlining vtables? https://gcc.godbolt.org/z/ZXkRYa

[Bug tree-optimization/89491] New: Inline jump tables

2019-02-25 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- int square(int x) { return x*x; } int add(int x) { return x + x; } typedef int (*p) (int); p arr[4] = {square, add}; int test(int x) { int res = arr[1](x); return

[Bug tree-optimization/89491] Inline jump tables

2019-03-01 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89491 --- Comment #5 from Dávid Bolvanský --- Let's take the original example with small modification: int square(int x) { return x*x; } int add(int x) { return x + x; } typedef int (*p)(int); static const p arr[4] = {square, add}; int test(int x) {

[Bug c/89738] New: Warn for unused macro arguments

2019-03-16 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- I found a nasty bug in my code which was related to unused macro arguments. #define PARENT_NODE(x) ((id - 1) / 2) As you can see, the "id" macro argument was unused. The code w

[Bug preprocessor/89738] Warn for unused macro arguments

2019-03-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89738 --- Comment #2 from Dávid Bolvanský --- #define PARENT_NODE(x) ((id - 1) / 2) int id = 0; int idx = 1; PARENT_NODE(idx); // macro contais id, but id is defined, warn? But probably such analysis is not so easy...

[Bug c++/89708] New: printf and std::byte

2019-03-13 Thread david.bolvansky at gmail dot com
: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- #include #include typedef unsigned char byte_t; void test (byte_t a, std::byte b) { printf("%u", a); // OK printf("%hhu", a); // OK printf("%u",

[Bug tree-optimization/89263] New: Simplify bool expression to OR

2019-02-09 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- bool foo(bool a, bool b) { if (a) return true; return b; } Current: foo(bool, bool): testdil, dil mov eax, esi cmovne

[Bug c++/90629] New: Support for -Wmismatched-new-delete

2019-05-25 Thread david.bolvansky at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- void alloc() { int *arr = new int [10]; delete arr; } GCC with -Wall -Wextra - No warnings. Clang with -Wall -Wextra: :5:5: warning: 'delete' applied to a pointer

[Bug middle-end/90693] Missing popcount simplifications

2019-06-07 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug middle-end/90693] Missing popcount simplifications

2019-06-07 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90693 --- Comment #3 from Dávid Bolvanský --- I measured it a bit.. (x-1)

[Bug tree-optimization/90917] New: Propagate constants into loads if dominated by str(n)cmp/memcmp

2019-06-18 Thread david.bolvansky at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Motivation: char f(char* s) { if (strcmp(s, "test") == 0) return s[0]; return '-'; } ---> ch

[Bug tree-optimization/90917] Propagate constants into loads if dominated by str(n)cmp/memcmp

2019-06-18 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90917 --- Comment #1 from Dávid Bolvanský --- char f(void) { char* s = ... ; if (strcmp(global_s, s) == 0) return global_s[0]; return '-'; } --> char f2(void) { char* s = ... ; if (strcmp(global_s, s) == 0) return s[0]; return '-'; }

[Bug c++/90885] GCC should warn about 2^16 and 2^32 and 2^64

2019-06-17 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90885 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c++/90353] No warning on unused exception parameter with -Wall -Wextra

2019-05-10 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90353 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/90554] New: Missed vectorization with conditionally defined the end of the loop

2019-05-21 Thread david.bolvansky at gmail dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- int vectorize(int b, unsigned *x, unsigned *y, int N, int NN) { int sum = 0; int end = b ? N : NN; unsigned *p = b

[Bug tree-optimization/90373] New: Better alias analysis based on libc functions with arguments which cannot alias

2019-05-07 Thread david.bolvansky at gmail dot com
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- bool foo(int *a, int *b, unsigned n) { memcpy(a, b, n); return a == b; } GCC trunk X86-64

[Bug c++/90159] New: Poor warning for an ambiguous reference

2019-04-18 Thread david.bolvansky at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Test case: #include #include using namespace std; struct sort_heap { bool operator()(const int* lhs, const int* rhs) const { return *lhs

[Bug regression/91185] -Og miscompiles code causing runtime segfault

2019-07-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91185 --- Comment #1 from Dávid Bolvanský --- (gdb) r bw Starting program: /home/xbolva00/IFJ16/src/ifj16c bw Program received signal SIGSEGV, Segmentation fault. 0xeac5 in eval (op=0x55768b80) at interpret.c:37 37 tVar

[Bug regression/91185] New: -Og miscompiles code causing runtime segfault

2019-07-16 Thread david.bolvansky at gmail dot com
: regression Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- tVar *eval(tVar *op) { if (unlikely(op == NULL)) return NULL; tVar *a = op->offset + frame_stack.top->frame->local;

[Bug regression/91185] -Og miscompiles code causing runtime segfault

2019-07-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91185 Dávid Bolvanský changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2019-08-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c++/90885] GCC should warn about 2^16 and 2^32 and 2^64

2019-08-16 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90885 --- Comment #20 from Dávid Bolvanský --- Clang implemented [0] this diagnostic under -Wxor-used-as-pow. From user perspective it would be reasonable if GCC follows this naming. [0] https://reviews.llvm.org/D63423

[Bug c/89549] [7/8/9/10 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-09-06 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 --- Comment #11 from Dávid Bolvanský --- Would be nice to fix this for the last release of GCC 7.

[Bug c++/91746] New: Bogus error due to a type and variable with the same name

2019-09-11 Thread david.bolvansky at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- GCC fails to compile: struct pixel { int x; int y; }; struct master { pixel pixel; }; :9:11: error: declaration of 'pixel

[Bug c++/91761] Overloaded new operator compiled with -O3 option distorts original C++ code

2019-09-13 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91761 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/89549] [7/8/9/10 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-08-01 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug tree-optimization/88814] transform snprintf into memccpy

2019-10-02 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88814 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug target/29776] result of ffs/clz/ctz/popcount/parity are already sign-extended

2019-09-29 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29776 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/89549] [7/8/9/10 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-11-05 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 --- Comment #12 from Dávid Bolvanský --- This missed gcc 7.5 :/

[Bug c++/92182] New: No way to silence ''A::TKind' is too small to hold all values of 'enum Kind''

2019-10-22 Thread david.bolvansky at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- enum Kind : unsigned { Y = 0x0, N = 0x1, Z = 0x2, }; struct A { Kind TKind : 2; }; gcc file.c

[Bug c/89549] [8/9/10 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-11-25 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 --- Comment #17 from Dávid Bolvanský --- Check few lines above https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549#c8

[Bug c/89549] [8/9/10 Regression] -Wmisleading-indentation is disabled from this point onwards, since column-tracking was disabled due to the size of the code/headers

2019-11-25 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549 --- Comment #15 from Dávid Bolvanský --- But there is no way to silence this "note".

[Bug c++/61414] enum class bitfield size-checking needs a separate warning flag controlling it

2019-11-04 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414 --- Comment #19 from Dávid Bolvanský --- 5 years... Can anybody fix it? It is real issue on real world code: https://reviews.llvm.org/D69792

[Bug c++/91840] New: Support for #pragma unroll (N)

2019-09-20 Thread david.bolvansky at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Clang/ICC supports #pragma unroll (N) and it would be good if GCC too, so we don't have to write macros to workaround it and to keep the code buildable by all tree compilers

[Bug other/81334] -Wmisleading-indentation prints notes about being disabled even when already intentionally ignored

2019-10-03 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81334 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c++/93446] New: Improve -Wconversion warning message

2020-01-26 Thread david.bolvansky at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Code: void foo() { char c = 255; } GCC: warning: conversion from 'int' to 'char' changes value from '255' to '\377' [-Wconversion] Clang: warning: implicit

[Bug analyzer/93723] ICEs building ada with -fanalyzer

2020-02-17 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93723 --- Comment #2 from Dávid Bolvanský --- Without LTO during IPA pass: analyzer common/entropy_common.c: In function ‘HUF_readStats’: common/entropy_common.c:196:37: internal compiler error: in make_region_for_type, at

[Bug analyzer/93723] ICEs building ada with -fanalyzer

2020-02-17 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93723 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug analyzer/93798] New: ICE in make_region_for_type

2020-02-17 Thread david.bolvansky at gmail dot com
Assignee: dmalcolm at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Created attachment 47865 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47865=edit preprocessed zstd source file Using latest snapshot: gcc-latest_10.0.1-20200126git787c79e55

[Bug analyzer/93723] ICEs building ada with -fanalyzer

2020-02-17 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93723 --- Comment #4 from Dávid Bolvanský --- Thanks, created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93798

[Bug tree-optimization/93721] swapping adjacent scalars could be more efficient

2020-02-14 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93721 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c++/94723] New: Missing -Wdeprecated warning when user-declared copy assignment operator is defined as deleted

2020-04-22 Thread david.bolvansky at gmail dot com
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- struct S { int i; S& operator=(const S&) = delete; }; S test(const S& s) { return

[Bug c/96433] New: Failed to optimize (A / N) * N <= A

2020-08-03 Thread david.bolvansky at gmail dot com
: c Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- const __SIZE_TYPE__ N = 3; int foo(__SIZE_TYPE__ len) { __SIZE_TYPE__ newlen = (len / N) * N; return newlen <= len; }

[Bug rtl-optimization/31799] Failed to optimize out test instruction

2020-08-03 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31799 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/96433] Failed to optimize (A / N) * N <= A

2020-08-03 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96433 --- Comment #1 from Dávid Bolvanský --- Codegen: https://godbolt.org/z/7EvYj9 foo: movabs rdx, -6148914691236517205 mov rax, rdi mul rdx mov rax, rdx and rdx, -2 shr rax

[Bug rtl-optimization/31799] Failed to optimize out test instruction

2020-08-03 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31799 --- Comment #6 from Dávid Bolvanský --- ^ Posted by mistake. Sorry.

[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4

2020-08-01 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #14 from Dávid Bolvanský --- Or change -Os to be gcc10 -O2 with less inlining, -revert O2 to gcc9 -02 and implement -Oz to create agressive “-Os”.

[Bug analyzer/95042] ICE in can_merge_p, at analyzer/region-model.cc:2053

2020-06-21 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95042 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug tree-optimization/90949] [9 Regression] null pointer check removed

2020-06-03 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90949 --- Comment #18 from Dávid Bolvanský --- Yes, PR95492

[Bug c/95492] New: Avoid recursive inlining for -O2

2020-06-03 Thread david.bolvansky at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- Test case from PR90949: int puts(const char*); void free(void*); void* malloc(unsigned long); #define NULL 0 struct Node { struct Node* child; }; void walk(struct Node* module

[Bug tree-optimization/90949] [9 Regression] null pointer check removed

2020-06-02 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90949 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug tree-optimization/90949] [9 Regression] null pointer check removed

2020-06-02 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90949 --- Comment #16 from Dávid Bolvanský --- For -O3 it is okay, but for -O2 this is questionable

[Bug ipa/96337] [10/11 Regression] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4

2020-07-28 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 --- Comment #10 from Dávid Bolvanský --- >> Compiler version : GCC10.1.1 Maybe you want to use same GCC version as phoronix used (GCC 10.2)?

[Bug rtl-optimization/96337] GCC 10.2: twice as slow for -O2 -march=x86-64 vs. GCC 9.3/8.4

2020-07-27 Thread david.bolvansky at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96337 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/98713] New: Failure to generate branch version of abs if user requested it

2021-01-17 Thread david.bolvansky at gmail dot com via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- int branch_abs(int v) { return __builtin_expect(v > 0, 1) ? v : -v; } GCC -O2 now: branch_abs: mov eax, edi neg eax cm

[Bug c/98658] Loop idiom recognization for memcpy/memmove

2021-01-13 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98658 --- Comment #3 from Dávid Bolvanský --- Yes, runtime check.

[Bug other/98663] gcc generates endless loop at -O2 or greater depending on order of testExpression

2021-01-13 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98663 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug middle-end/98713] Failure to generate branch version of abs if user requested it

2021-01-18 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98713 --- Comment #5 from Dávid Bolvanský --- User knows the data better, so he/she may prefer abs with branch. Also PGO may say that branch for abs is better based on profile data.

[Bug c/98658] Loop idiom recognization for memcpy/memmove

2021-01-13 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98658 --- Comment #1 from Dávid Bolvanský --- ICC produces memcpy: https://godbolt.org/z/oKxxTM

[Bug c/98658] New: Loop idiom recognization for memcpy/memmove

2021-01-13 Thread david.bolvansky at gmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- void copy(int *__restrict__ d, int * s, __SIZE_TYPE__ sz) { __SIZE_TYPE__ i; for (i = 0; i < sz; i++) { *d++ = *s++; } } gcc emits call to memcpy. v

[Bug c/100260] New: DSE: join stores

2021-04-25 Thread david.bolvansky at gmail dot com via Gcc-bugs
: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- #include struct pam { void *p1; void *p2; #ifdef LONG unsigned long size; #else unsigned int pad; unsigned int size; #endif }; extern int use(struct pam *param); unsigned int

[Bug tree-optimization/99971] GCC generates partially vectorized and scalar code at once

2021-04-15 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99971 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug target/98348] [10 Regression] GCC 10.2 AVX512 Mask regression from GCC 9

2021-04-11 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98348 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug tree-optimization/102483] New: Regression in codegen of reduction of 4 chars

2021-09-25 Thread david.bolvansky at gmail dot com via Gcc-bugs
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- char foo (char* p) { char sum = 0; for (int i = 0; i != 4; i++) sum += p[i]; return sum; } -O3 -march=x86-64 GCC trunk: foo

[Bug tree-optimization/102564] New: Missed loop vectorization with reduction and ptr load/store inside loop

2021-10-02 Thread david.bolvansky at gmail dot com via Gcc-bugs
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- void test1(int *p, int *t, int N) { for (int i = 0; i != N; i++) *t += p[i]; } void test2(int *p, int

[Bug tree-optimization/93150] (A) == CST1 &( ((A)==CST2) | ((A)==CST3) ) is not simplified

2021-11-11 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93150 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug tree-optimization/103002] New: Missed loop unrolling opportunity

2021-10-29 Thread david.bolvansky at gmail dot com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- #define C 3 struct node { struct node *next; int payload; }; static int count_nodes(const node* p) { int size = 0; while (p) { p = p

[Bug ipa/104187] Call site specific attribute to control inliner

2022-03-03 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104187 --- Comment #8 from Dávid Bolvanský --- So this works in Clang now int foo(int x, int y) { // any compiler will happily inline this function return x / y; } int test(int x, int y) { int r = 0; [[clang::noinline]] r += foo(x, y);

[Bug c/104187] New: Call site specific attribute to control inliner

2022-01-22 Thread david.bolvansky at gmail dot com via Gcc-bugs
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- It could be useful to have more control over inlining. Use cases: int foo(); void bar(); int g; void test() { g = __builtin_always_inline(foo()); // force

[Bug ipa/104187] Call site specific attribute to control inliner

2022-01-25 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104187 --- Comment #5 from Dávid Bolvanský --- So you prefer eg. g = a[i] - [[gnu::always_inline]] foo(x, y) + 2 * bar(); over g = a[i] - __builtin_always_inline(foo(x, y)) + 2 * bar(); ? What is your proposed syntax?

[Bug rtl-optimization/7061] Access of bytes in struct parameters

2022-06-11 Thread david.bolvansky at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7061 Dávid Bolvanský changed: What|Removed |Added CC||david.bolvansky at gmail dot com

[Bug c/108593] New: No inlining after function cloning

2023-01-29 Thread david.bolvansky at gmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: david.bolvansky at gmail dot com Target Milestone: --- int __attribute__ ((noinline)) foo (int arg) { return 2 * arg; } int bar (int arg) { return foo (5); } results in: foo.constprop.0: mov eax, 10 ret foo