[Bug tree-optimization/103216] missed optimization, phiopt/vrp?

2021-12-20 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103216 mcccs at gmx dot com changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment

[Bug tree-optimization/86604] phiopt missed optimization of conditional add

2021-12-20 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86604 mcccs at gmx dot com changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug target/93082] macOS Authorization.h needs fixinclude

2020-11-27 Thread mcccs at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93082 --- Comment #4 from mcccs at gmx dot com --- (In reply to Fabian Groffen from comment #3) > The problem with this snippet is that it doesn't work on Frameworks, does > it? At least for me, it seems it searches from usr/include only

[Bug web/95165] New: Since 9.1 we do have ISO_Fortran_binding.h

2020-05-16 Thread mcccs at gmx dot com
Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- At https://gcc.gnu.org/onlinedocs/gfortran/Further-Interoperability-of-Fortran-with-C.html#Further-Interoperability-of-Fortran-with-C outdated statement: > GNU Fortran always u

[Bug target/93082] macOS Authorization.h needs fixinclude

2019-12-29 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93082 --- Comment #2 from mcccs at gmx dot com --- Reported on the "other side" https://bugs.llvm.org/show_bug.cgi?id=44406 Changing it to enum works too, my only doubt is that it has a different width and sign (but better than not compiling

[Bug target/93082] New: macOS Authorization.h needs fixinclude

2019-12-27 Thread mcccs at gmx dot com
Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- This bug has existed for at least two years. In Authorization.h: ``` static const size_t kAuthorizationExternalFormLength = 32; typedef struct { char bytes

[Bug middle-end/90348] Small inlined function has local variables in invalid stack location

2019-05-05 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348 MCCCS changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment #2 from MCCCS

[Bug target/83531] Build broken on macOS 10.13.2

2019-01-17 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531 --- Comment #6 from MCCCS --- After reading your comment, I noticed that there were two things I forgot to mention: 1 - availability.h is the file where "API_AVAILABLE" is defined for Clang. 2 - the part of the file the patch changes is 1:1

[Bug target/83531] Build broken on macOS 10.13.2

2019-01-16 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531 --- Comment #4 from MCCCS --- Iain could you please test if this patch works for you too? If so, I'll send it as a patch tomorrow (For me, it even fixes g++.dg/other/darwin-cfstring1.C): Index: fixincludes/fixincl.x

[Bug target/83531] Build broken on macOS 10.13.2

2019-01-14 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83531 MCCCS changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment #2 from MCCCS

[Bug c/88645] Don't assume functions are always nonnull if there's __attribute__((weak_import)), similar to __attribute__((weak))

2019-01-01 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88645 MCCCS changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c/88645] Don't assume functions are always nonnull if there's __attribute__((weak_import)), similar to __attribute__((weak))

2018-12-31 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88645 --- Comment #1 from MCCCS --- Typo: fix can be added to "decl_with_nonnull_addr_p" of "/c-family/c-common.c" if anyone is interested.

[Bug c/88645] New: Don't assume functions are always nonnull if there's __attribute__((weak_import)), similar to __attribute__((weak))

2018-12-31 Thread mcccs at gmx dot com
: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- OS: Darwin/macOS Test vector: extern void a (void) __attribute__

[Bug target/88035] missing _mm512_reduce_round_pd() et al

2018-12-08 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88035 MCCCS changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment #1 from MCCCS

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-06 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393 --- Comment #7 from MCCCS --- The problem was that the LLVM assembler required -mavx512f. I've researched it and found that this LLVM bug was fixed months and shipped with LLVM 7. Apple updates Xcode's LLVM with one year delay, and it should be

[Bug target/88353] AVX512 instructions on macOS using Xcode Clang's assembler needs extra flags

2018-12-05 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88353 MCCCS changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/86393] GCC-8 appears to not detect AVX512 on iMac Pro 2018

2018-12-05 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86393 MCCCS changed: What|Removed |Added CC||mcccs at gmx dot com --- Comment #5 from MCCCS

[Bug target/88353] New: AVX512 instructions on macOS using Xcode Clang's assembler needs extra flags

2018-12-04 Thread mcccs at gmx dot com
: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- Note: You can skip to the tldr. #include int main(void) { __m512i a; a = _mm512_conflict_epi32(a); return (int)a[1]; } $ gcc-8

[Bug tree-optimization/88014] New: Restrict/C2X/N2260 Restricted function argument

2018-11-14 Thread mcccs at gmx dot com
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- N2260 ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2260.pdf ) has been integrated to C2X, according to https://gustedt.wordpress.com/2018/11/12/c2x/ . Code taken

[Bug bootstrap/87788] [9 Regression] Bootstrap fails for x86_64-apple-darwin* with default languages selection after D addition.

2018-11-05 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87788 --- Comment #16 from MCCCS --- Hi, could you please change the component from "bootstrap" to "d" ? The same error occurs during non-bootstrap compiling too. Otherwise this is in the wrong category, people might not see this and send duplicates.

[Bug d/87876] New: Mac failing: conversion from longdouble to long int is ambiguous

2018-11-04 Thread mcccs at gmx dot com
Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: mcccs at gmx dot com Target Milestone: --- macOS 10.14.1 compiled with GCC 8.2 /Users/username/Downloads/gcc-trunk/gcc/d/dmd/constfold.c:1162:50: error: conversion from 'real_t' {aka

[Bug web/87829] New: Contradiction about -fReorder-Blocks

2018-10-31 Thread mcccs at gmx dot com
Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- On this page: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html (invoke.texi) It says: @option{-Os} disables the following optimization flags: @gccoptlist{-falign-functions -falign

[Bug tree-optimization/87261] New: Optimize bool expressions

2018-09-09 Thread mcccs at gmx dot com
Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- (~x & y) | ~(x | y) (x | y) ^ (x | ~y) (x & y) | ~(x | y) (~x | y) ^ (x ^ y) (x ^ y) | ~(x | y) Patch ready, will send it soon. Submitted here to reserve a `prABCDE.c` file in gcc.dg.

[Bug tree-optimization/87186] Does not inline constant to simplify bitwise expression

2018-09-03 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87186 --- Comment #4 from MCCCS --- Flags: -O2 -fdump-tree-original Code: int f1 (int x, int s) { return ~(~(x|s)|x)|~(~(x|s)|s); } int f2 (int x, int s) { const int t = x|s; return ~(~t|x)|~(~t|s); } int f3 (int x, int s) { const int t = ~(x|s);

[Bug tree-optimization/87186] Does not inline constant to simplify bitwise expression

2018-09-02 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87186 --- Comment #1 from MCCCS --- It can simplify ~(~(x|s)|x)|~(~(x|s)|s) to s^x but it can't simplify const int t = x|s; ~(~t|x)|~(~t|s) or const int t = ~(x|s); ~(t|x)|~(t|s) or const int t = ~x&~s; ~(t|x)|~(t|s)

[Bug tree-optimization/87186] New: Does not inline constant to sim

2018-09-02 Thread mcccs at gmx dot com
Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: ---

[Bug tree-optimization/87009] Can't find XOR pattern applying De Morgan sequentially

2018-08-18 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87009 --- Comment #1 from MCCCS --- Proposed patch: Index: gcc/match.pd === --- gcc/match.pd(revision 263646) +++ gcc/match.pd(working copy) @@ -776,6 +776,11 @@

[Bug tree-optimization/87009] New: Can't find XOR pattern applying De Morgan sequentially

2018-08-18 Thread mcccs at gmx dot com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- Optimization: -Ofast Suggested debugging layout: https://godbolt.org/g/ERWctt int xor_int(int a, int b) { ... } Don't work: int x = ~(a|b); return ~(x|a)|~(x

[Bug tree-optimization/86710] New: 3 missing logarithm optimizations

2018-07-28 Thread mcccs at gmx dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- I've looked at match.pd, and spotted missing properties of logarithm. I could poorly write the code for two, still needs to check that the log base is the same: (for logs (LOG LOG2

[Bug tree-optimization/86604] New: Compiler can't think of smaller variable ranges

2018-07-20 Thread mcccs at gmx dot com
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- Summary: The compiler thinks variables as of the widest domain. (32 bits for int, 64 bits for int64_t) It's possible to optimize further by giving the compiler a hint

[Bug tree-optimization/86136] Modular multiplication optimization

2018-06-24 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86136 --- Comment #3 from MCCCS --- What about unsigned int k (unsigned int a) { if (a > 5) { __builtin_unreachable(); } return (a * 83) % 5; }

[Bug c/86150] New: Trunk Segmentation Fault

2018-06-14 Thread mcccs at gmx dot com
: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- This has been happening since ~5 days ago. -v output: Using built-in specs. COLLECT_GCC=/opt/compiler-explorer/gcc-snapshot/bin/g++ COLLECT_LTO_WRAPPER=/opt/compiler-explorer/gcc-trunk-20180611/bin

[Bug tree-optimization/86136] Modular multiplication optimization

2018-06-13 Thread mcccs at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86136 --- Comment #1 from MCCCS --- Note: It can notice (a * n) % k = 0 if n is a multiple of k. The bug happens only if n % k != 0.

[Bug tree-optimization/86136] New: Modular multiplication optimization

2018-06-13 Thread mcccs at gmx dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- Optimization: Ofast GCC can't see that (a * n) % k = (a * (n % k)) % k (even) when n is known at compile time. As a result, int k (int a) { return (a * t) % 5; } always

[Bug tree-optimization/85971] New: Really Simple "If" with one function call inside is not optimized efficiently

2018-05-29 Thread mcccs at gmx dot com
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- GCC: 8 or 9/trunk Optimization: O3 or Ofast Code: ``` int PolyMod(int s); void CreateChecksum(int isTe

[Bug rtl-optimization/85283] New: Generates 20 lines of assembly while only one assembly instruction is enough.

2018-04-08 Thread mcccs at gmx dot com
: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: mcccs at gmx dot com Target Milestone: --- GCC version: trunk/20180407 (also older versions) Target: x86_64-linux-gnu Compile options: -Ofast -mavx2 -mfma -Wall