[Bug target/121662] New: Unnecessary data dependant branches with avx512 masks

2025-08-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64 /* { dg-do compile } */ /* { dg-options " -mavx512vl -mavx512bw -mavx512f -O3" } */ void ubyteshiftl_mask (unsigned char *

[Bug target/121658] [16 Regression] ICE: in extract_insn, at recog.cc:2884 (unrecognizable insn) with -O -mavx512f -mgfni by r16-3364-g001cd39749f94e

2025-08-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121658 --- Comment #2 from Andi Kleen --- Created attachment 62194 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62194&action=edit Fix Still need to run full test suite.

[Bug fortran/121570] Very high cost of ieee_next_after function, gfortran optimization failure?

2025-08-18 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121570 --- Comment #13 from Andi Kleen --- Reducing the use of the function makes sense (I suspect it's not needed in many cases), but another option would be to allow moving it out of loops if it covers the whole loop body. The later would fix this te

[Bug fortran/121570] Very high cost of ieee_next_after function, gfortran optimization failure?

2025-08-18 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121570 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug middle-end/121159] [[noreturn]] pessimizes code size and performance

2025-07-21 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121159 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug bootstrap/121038] autoprofiledbootstrap is broken in few ways

2025-07-15 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121038 --- Comment #3 from Andi Kleen --- Better use set -e instead of explicit exit checks. Yes it's dumb design in the tool, it could just stream the data. In fact if it did that we could use the perf pipe mode to not even create a temporary file.

[Bug c++/63164] unnecessary calls to __dynamic_cast

2025-07-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63164 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug bootstrap/121038] autoprofiledbootstrap is broken in few ways

2025-07-11 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121038 --- Comment #1 from Andi Kleen --- 1) If you don't get data loss (perf should complain) the -m change should be fine. Alternatively increase /proc/sys/kernel/perf_event_mlock_kb 5) IIRC the --all was a workaround for something, but I can't reme

[Bug middle-end/119482] slow compilation on ladybird interpreter

2025-06-05 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119482 --- Comment #19 from Andi Kleen --- Can you do perf record/report and add the output? But if its any different than ladybird its unlikely to be fixable without a test case, except perhaps if you can bisect it

[Bug bootstrap/120464] [16 Regression] Build broken in ggc-page.cc on master since r16-852

2025-05-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120464 --- Comment #5 from Andi Kleen --- Sorry about that. Thanks Jakub. Patch looks good to me.

[Bug c++/119957] New: vtable-verify.cc has poor test coverage

2025-04-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Only 54% coverage with quite some code paths missing according to https://gcc.opensuse.org/gcc-lcov/gcc/index.html

[Bug lto/119956] New: lockfile / lto-ltrans-cache have poor testing coverage

2025-04-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- lockfile.cc has 0% and lto-ltrans-cache.cc only 4.3% coverage for a x86-64 standard test suite run according to https://gcc.opensuse.org/gcc-lcov/gcc/index.html

[Bug ipa/119955] New: ipa-locality-cloning.cc has poor test coverage

2025-04-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: ipa Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- only 1.6% coverage in a standard x86-64 test suite run for ipa-locality-cloning.cc according to https://gcc.opensuse.org/gcc-lcov/gcc/index.html

[Bug driver/119727] -freport-bug vs. ASLR

2025-04-11 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119727 --- Comment #4 from Andi Kleen --- Yes but on the OS where you know it it's better to do both to make the runs more reproducible. There are also bugs that don't reproduce on ASLR

[Bug driver/119727] -freport-bug vs. ASLR

2025-04-11 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119727 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug preprocessor/106767] Failure to detect recursive macro calls due to _Pragma(pop_macro)

2025-04-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106767 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug gcov-profile/119719] Suitability of gcov for very resource-constrained systems

2025-04-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119719 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug c++/119705] Massive memory use when building Flang (10GB+)

2025-04-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119705 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug middle-end/119482] slow compilation on ladybird interpreter

2025-04-02 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119482 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug middle-end/114563] ggc_internal_alloc is slow

2025-03-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114563 --- Comment #10 from Andi Kleen --- It doesn't really help for the PR119387 test case, perhaps not surprising because it optimizes freeing not allocation: Summary ./gcc/cc1plus-opt -w -std=c++20 ~/gcc/git/tsrc/119387-formatted.ii -quiet ran

[Bug middle-end/114563] ggc_internal_alloc is slow

2025-03-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114563 Andi Kleen changed: What|Removed |Added Attachment #60907|0 |1 is obsolete|

[Bug c++/64500] push_to_top_level() shows up high during build of modern C++ code

2025-03-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64500 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug middle-end/114563] ggc_internal_alloc is slow

2025-03-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114563 --- Comment #6 from Andi Kleen --- Created attachment 60907 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60907&action=edit patch for multiple free lists in ggc-page I saw it in some profile, but later trying didn't help anymore. Needs

[Bug sanitizer/107048] GCC lacks -fsanitize=kcfi

2025-03-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107048 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug ipa/119376] [15 Regression] musttail does not get dropped after inlining?

2025-03-24 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119376 --- Comment #18 from Andi Kleen --- Yes the multiple passes are a problem. They also do redundant work I believe. But it would be easier to just check opt_tailcalls I think instead of adding a new variable. >Plus, given that tail_calls pass use

[Bug gcov-profile/119375] Some autofdo test cases fail

2025-03-21 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119375 --- Comment #4 from Andi Kleen --- I applied Alex's patches, but had to resolve one conflict. Unfortunately made no difference in the test results.

[Bug gcov-profile/119375] Some autofdo test cases fail

2025-03-20 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119375 --- Comment #2 from Andi Kleen --- I already had that commit in my tree, since it was already on trunk. Or did you think of something different? commit cfdb961588ba318a78e995d2e2cde43130acd993 Author: Alex Coplan Date: Tue Nov 26 17:48:14 20

[Bug ipa/119376] [15 Regression] musttail does not get dropped after inlining?

2025-03-19 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119376 --- Comment #6 from Andi Kleen --- For the gcc 15 release we could just drop the clang:: support, so it becomes opt-in? (have to use gnu::musttail)

[Bug gcov-profile/119375] New: Some autofdo test cases fail

2025-03-19 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: erozen at microsoft dot com Target Milestone: --- Host: x86_64-linux This can be only seen on x86_64 hosts which have the autofdo tooling installed (which is not most

[Bug gcov-profile/119365] New: -fprofile-correction not covered by test suite

2025-03-19 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: gcov-profile Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- According to https://gcc.opensuse.org/gcc-lcov/gcc/mcf.cc.gcov.html mcf.cc is not executed at all in standard test suite runs. This is called through

[Bug c/116545] Support old style statement attributes

2025-03-12 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116545 --- Comment #5 from Andi Kleen --- Something like this untested patch would likely also fix the test case: diff --git a/gcc/c-family/c-lex.cc b/gcc/c-family/c-lex.cc index e450c9a57f0..e1f78431210 100644 --- a/gcc/c-family/c-lex.cc +++ b/gcc/c

[Bug c/116545] Support old style statement attributes

2025-03-12 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116545 --- Comment #2 from Andi Kleen --- It's too late to fix gcc 15, you'll just have to release an update. Sorry.

[Bug preprocessor/116087] Add optional warning for too large macro expansion

2025-03-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116087 --- Comment #4 from Andi Kleen --- After some digging into the code: libcpp already keeps track of how many tokens get expanded in a global. This is even accessible for through linemap's statistics dumped on -fmem-report, but only as a averaged

[Bug target/118288] Using new crc builtins on i386 leads to ICE

2025-02-15 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118288 Andi Kleen changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2025-02-07 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 Andi Kleen changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2025-02-02 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #17 from Andi Kleen --- With the patches now in trunk the overhead for enabling -Wmisleading-indentation is now ~32% unless --param=file-cache-lines=1 is used. With the drop behind cache it would be noise.

[Bug tree-optimization/118657] Missed optimization (unreachable branch could be pruned after taking into account the possible values of a constexpr lookup table)

2025-01-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118657 --- Comment #9 from Andi Kleen --- With constexpr you are guaranteed an visible initializer. const would potentially require messing with IPA and might impossible.

[Bug tree-optimization/118657] Missed optimization (unreachable branch could be pruned after taking into account the possible values of a constexpr lookup table)

2025-01-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118657 --- Comment #6 from Andi Kleen --- The C test case needs to use constexpr too. #define DATA_SIZE 1024 static constexpr int TO_DATA_INDEX[DATA_SIZE] = {}; bool foo(int* data, unsigned char first_idx) { int second_idx = TO_DATA_INDEX[first_idx]

[Bug tree-optimization/118657] Missed optimization (unreachable branch could be pruned after taking into account the possible values of a constexpr lookup table)

2025-01-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118657 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug testsuite/116080] [15 regression] New tests from r15-2233-g8d1af8f904a0c0 fail

2025-01-24 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116080 --- Comment #26 from Andi Kleen --- It's quite difficult to express the rules for tail calls for all targets in dejagnu effective rules. Currently we're a bit too aggressive for excluding on Power, but nobody has the energy to reopen it again,

[Bug target/107827] switch table compression could shrink large tables (but missing), testcase cerf-lib

2025-01-21 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107827 --- Comment #7 from Andi Kleen --- We need a validator for x86 assembler length indications in the x86 machine descriptions, then it could be easily enabled. This will require patching gas at least for test suite runs.

[Bug gcov-profile/118442] -fprofile-generate wrongly adds instrumentation after musttail call

2025-01-18 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118442 --- Comment #4 from Andi Kleen --- The problem seems to be that the call BB has an extra fallthrough edge to the basic block containing the return. Perhaps it should just have an EXIT edge or not split the RETURN? (not sure if that is legal in

[Bug gcov-profile/118442] -fprofile-generate wrongly adds instrumentation after musttail call

2025-01-18 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118442 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug c++/118469] ICE in lexical parser if too many open parentheses

2025-01-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118469 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug tree-optimization/118468] vectorizer: if conversion does not handle early exit well

2025-01-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118468 Andi Kleen changed: What|Removed |Added Summary|vectorizer: extra phi |vectorizer: if conversion

[Bug target/95834] x86 immediates --- some redundant

2025-01-13 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95834 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org --- Comment

[Bug tree-optimization/118468] New: vectorizer: extra phi blocks vectorization of if

2025-01-13 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- This is forked from PR116126 to handle another early exit problem const unsigned char *search_line_fast2 (const unsigned char *s, const unsigned char

[Bug target/118373] gcc-14.2 kernel panic on alderlake cpus

2025-01-11 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118373 --- Comment #13 from Andi Kleen --- If it immediately reboots (and you didn't use panic=XXX to reboot quickly) then it might be a triple fault. These are unfortunately harder to debug because they don't produce any console output in a native set

[Bug target/118373] gcc-14.2 kernel panic on alderlake cpus

2025-01-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118373 --- Comment #8 from Andi Kleen --- Classical "make photo of panic" screen method should be enough. The critical part is the Code: line that shows the bad instruction, and the name of the function.

[Bug tree-optimization/106883] SLSR may generate signed wrap

2025-01-09 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106883 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug target/118289] Using new crc builtins leads to ICE on x86_64

2025-01-03 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118289 --- Comment #2 from Andi Kleen --- Yes sorry for the dup.

[Bug target/118289] New: Using new crc builtins leads to ICE on x86_64

2025-01-03 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64 (I suspect it will affect any non aarch64 target) ./gcc/cc1 -I ../gcc/gcc/ginclude/ ../gcc/gcc/testsuite/gcc.target/aarch64/crc-builtin

[Bug rtl-optimization/118288] New: Using new crc builtins on i386 leads to ICE

2025-01-03 Thread andi-gcc at firstfloor dot org via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64 ./gcc/cc1 -I ../gcc/gcc/ginclude/ ../gcc/gcc/testsuite/gcc.target/aarch64/crc-builtin-pmul64.c crc8_data8 crc16_data8 crc16_data16

[Bug debug/118198] GCC wrong debug information bug

2024-12-31 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118198 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug tree-optimization/118250] missed optimization in multiple integer comparisons (like errno tests)

2024-12-30 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118250 --- Comment #2 from Andi Kleen --- With --param=switch-lower-slow-alg-max-cases=1 (so using greedy) trunk includes "38" in the first bit cluster, but the LLVM code is still better. I've seen the dynamic programing algorithm miss clusters like

[Bug target/118252] New: i386 should implement CASE_VECTOR_SHORTEN_MODE

2024-12-30 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Inspired by https://github.com/komrad36/CRC When generating a jump table for switch gcc always uses .long for PIC or .quad for non PIC. This both wastes code size and

[Bug target/118251] New: i386: Use carry bits of shifts

2024-12-30 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Inspired by https://github.com/komrad36/CRC Even though gcc has CRC pattern matching now which should be implemented on x86 too, it would be still good if it handled the manual coded

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #11 from Andi Kleen --- Fix posted here: https://inbox.sourceware.org/gcc-patches/20241227024559.2224623-1-a...@firstfloor.org/T/#t

[Bug tree-optimization/118211] New: tree-vectorize: vectorize input.cc, find_end_of_line

2024-12-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- This is the hot loop of the line searching function in gcc input.cc. It currently fails to vectorize on AVX512F. Would be nice if it could. % gcc -O3

[Bug target/113149] Function multiversioning prefers arch=x86-64-v3 to actual processors

2024-12-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113149 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug middle-end/118050] [15 Regression] timevar.cc:163:18: error: 'CLOCK_MONOTONIC' was not declared in this scope

2024-12-24 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118050 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-23 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #10 from Andi Kleen --- My earlier analysis was wrong. The file cache is exactly supposed to avoid this quadratic case. But the cache only works if the linemap knows the total number of lines, otherwise it uses a much slower fallba

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-23 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #9 from Andi Kleen --- Created attachment 59954 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59954&action=edit add tunables for file cache

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-22 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #8 from Andi Kleen --- Oh actually it's not the beginning, but some point file size / 100 (the scaled down line cache)

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-22 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #7 from Andi Kleen --- Actually in my case where i interrupted and the difference was 60k i think the problem was that the lexer offset was beyond the 100 lines where the position is cached, and when that happens the file_cache just

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-22 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #6 from Andi Kleen --- So the file cache has a window of 100 lines: static const size_t line_record_size = 100; The indentation code rereads the line of the guard, body, next statement and that is all cached if it's all within 100

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-22 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #3 from Andi Kleen --- never mind, i had an old compiler.

[Bug preprocessor/118168] -Wmisleading-indentation causes 10x+ overhead or higher (visible on mypy-1.13.0)

2024-12-22 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118168 --- Comment #1 from Andi Kleen --- Did you attach the correct file? I get mypy.c:9524:5: error: implicit declaration of function ‘__builtin_c23_va_start’; did you mean ‘__builtin_ms_va_start’? [-Wimplicit-function-declaration] 9524 | __bu

[Bug middle-end/117091] switch clustering takes extensive time with large switches even at -O0

2024-10-14 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117091 --- Comment #9 from Andi Kleen --- Yes I guess we should keep better switches at -O1 because machine generated code may have lot of switches. I don't think we need perfect clustering? Perhaps there is some heuristic that is good enough. Maybe j

[Bug middle-end/117091] switch clustering takes extensive time with large switches even at -O0

2024-10-13 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117091 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug other/116970] New: -ftime-report -fdiagnostics-format=sarif-file causes ICE

2024-10-04 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Priority: P3 Component: other Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- This is with tramp3d, but I suspect it will happen on other files too. % ./gcc/cc1plus -ftime-report -fdiagnostics-format=sarif-file

[Bug tree-optimization/116520] Multiple condition lead to missing vectorization due to missing early break

2024-09-12 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116520 --- Comment #7 from Andi Kleen --- Tamas also gave this example in PR115866 which shows the same problem: short a[100]; int foo(int n, int counter) { for (int i = 0; i < n; i++) { if (a[i] == 1 || a[i] == 2 || a[i] == 7 || a[i]

[Bug tree-optimization/115866] missed optimization vectorizing switch statements.

2024-09-10 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115866 --- Comment #8 from Andi Kleen --- It doesn't even try to convert the switch because of t.c.179.ifcvt: Can not ifcvt due to multiple exits if (loop->num_nodes > 2) { /* More than one loop exit is too much to handle. */ if (

[Bug target/116599] New: volatile generates unexpected RMW on global

2024-09-04 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- On x86_64-linux: volatile int a; void f1(void) { a++; } int b; void f2(void) { b++; } generates f1: movla(%rip), %eax addl$1

[Bug c/116545] New: Support old style statement attributes

2024-08-30 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Forked from PR83324. Applies to C/C++ It seems clang supports old style __attribute__ label attributes for musttail (and presumably others) while gcc only supports the standard

[Bug tree-optimization/116520] Multiple condition lead to missing vectorization due to missing early break

2024-08-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116520 Andi Kleen changed: What|Removed |Added Summary|incorrect |Multiple condition lead to

[Bug tree-optimization/116520] New: incorrect

2024-08-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: ---

[Bug tree-optimization/116500] gcc.dg/vect/vect-switch-ifcvt-1.c FAILs

2024-08-27 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116500 --- Comment #4 from Andi Kleen --- It seems sparc doesn't support comparisons in vectorization? /vol/gcc/src/hg/master/local/gcc/testsuite/gcc.dg/vect/vect-switch-ifcvt-1.c:13:7: missed: not vectorized: relevant stmt not supported: _13 = _1

[Bug tree-optimization/116500] gcc.dg/vect/vect-switch-ifcvt-1.c FAILs

2024-08-27 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116500 --- Comment #2 from Andi Kleen --- Do you have the dump file from tree-vect? I guess it just doesn't vectorize something here. The right fix is probably to skip it for sparc, or adjust the vect_int target test.

[Bug target/116497] Need no_caller_saved_registers with SSE support

2024-08-27 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116497 Andi Kleen changed: What|Removed |Added Resolution|--- |INVALID Status|WAITING

[Bug target/116497] Need no_caller_saved_registers with SSE support

2024-08-27 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116497 --- Comment #21 from Andi Kleen --- As HJ pointed out the change is not needed, the compiler DTRT with no_callee_saved_registers on the callees.

[Bug target/116497] Need no_caller_saved_registers with SSE support

2024-08-27 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116497 --- Comment #16 from Andi Kleen --- Created attachment 59013 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59013&action=edit test case This test case using Pinski's clobber trick shows the benefit. If you compile with -O2 -mgeneral-regs

[Bug target/116497] Need no_caller_saved_registers with SSE support

2024-08-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116497 --- Comment #1 from Andi Kleen --- Disable check for no_caller_saved_registers enforcing non FP. diff --git a/gcc/config/i386/i386-options.cc b/gcc/config/i386/i386-options.cc index f79257cc764..cec652cc9e6 100644 --- a/gcc/config/i386/i386-opt

[Bug target/116497] New: Need no_caller_saved_registers with SSE support

2024-08-26 Thread andi-gcc at firstfloor dot org via Gcc-bugs
: target Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org CC: hjl.tools at gmail dot com Target Milestone: --- Target: x86_64-linux When writing threaded code interpreters by chaining functions with musttail the normal

[Bug c++/116285] Compilation of nodejs/v8's v8_base_without_compiler.runtime-temporal.cc is slow

2024-08-13 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116285 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug gcov-profile/71672] inlining indirect calls does not work with autofdo

2024-08-12 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71672 Andi Kleen changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/116264] New: Spurious {NF}s in APX code

2024-08-06 Thread andi-gcc at firstfloor dot org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- Target: x86_64-linux unsigned fclear(unsigned a, unsigned b) { if (a & (1 << 10)) b &= ~(1 << 20); return b; } gives c

[Bug tree-optimization/115866] missed optimization vectorizing switch statements.

2024-08-06 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115866 Andi Kleen changed: What|Removed |Added Attachment #58804|0 |1 is obsolete|

[Bug tree-optimization/116166] risc-v (last) insn-emit-nn.c build takes hours

2024-08-05 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116166 --- Comment #13 from Andi Kleen --- Created attachment 58842 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58842&action=edit add a param to limit BBs for dominator pass Maybe something like this patch. It adds a check to disable the dom

[Bug ipa/116191] Avoid inlining in unlikely branches

2024-08-02 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116191 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug tree-optimization/115866] missed optimization vectorizing switch statements.

2024-08-01 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115866 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug tree-optimization/116166] risc-v (last) insn-emit-nn.c build takes hours

2024-08-01 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116166 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug testsuite/116163] RFE: add a linting tool for DegaGnu tests

2024-08-01 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116163 Andi Kleen changed: What|Removed |Added CC||andi-gcc at firstfloor dot org

[Bug testsuite/116080] [15 regression] New tests from r15-2233-g8d1af8f904a0c0 fail

2024-07-29 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116080 Andi Kleen changed: What|Removed |Added Attachment #58761|0 |1 is obsolete|

[Bug testsuite/116080] [15 regression] New tests from r15-2233-g8d1af8f904a0c0 fail

2024-07-29 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116080 --- Comment #8 from Andi Kleen --- Patch was reverted, it just made a bunch of tests unsupported. problems: - Need unique name for each new test to not confuse the caching - -O0 tests need to use musttail explictly because the musttail pass onl

[Bug c++/116019] Incorrect cannot-tail messages on targets

2024-07-29 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116019 Andi Kleen changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug c++/116019] Incorrect cannot-tail messages on targets

2024-07-29 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116019 Andi Kleen changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|FIXED

[Bug tree-optimization/116126] New: vectorize libcpp search_line_fast

2024-07-29 Thread andi-gcc at firstfloor dot org via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: andi-gcc at firstfloor dot org Target Milestone: --- This is somewhat of a metabug to track vectorization of libcpp/lex.c search_line_fast, which currently has manual vectorization for various architectures. It would be

[Bug c++/116019] Incorrect cannot-tail messages on targets

2024-07-28 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116019 Andi Kleen changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug testsuite/116080] New tests from r15-2233-g8d1af8f904a0c0 fail

2024-07-25 Thread andi-gcc at firstfloor dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116080 --- Comment #6 from Andi Kleen --- Created attachment 58761 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58761&action=edit Improve test suite tail call checks This patch should fix it. We must run the test suite tail call probes without

  1   2   3   4   5   6   7   >