[Bug tree-optimization/111036] New: Code generation error in handling __builtin_constant_p

2023-08-16 Thread bmei at broadcom dot com via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Target Milestone: --- Compile and run following code #include #define __align(n) __attribute__((aligned(n))) __attribute__((aligned(32))) static struct { unsigned

[Bug tree-optimization/71264] [4.9/5 Regression] ICE in convert_move

2016-07-08 Thread bmei at broadcom dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71264 --- Comment #17 from Bingfeng Mei --- OK, I will skip the vectorization check on our port then. Thanks.

[Bug tree-optimization/71264] [4.9/5 Regression] ICE in convert_move

2016-07-08 Thread bmei at broadcom dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71264 Bingfeng Mei changed: What|Removed |Added CC||bmei at broadcom dot com --- Comment #15

[Bug tree-optimization/71383] New: Misoptimized branch with inline assembly code.

2016-06-02 Thread bmei at broadcom dot com
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Target Milestone: --- For the following example: include static int a, b; static void bar() { asm volatile ("" : : : "memory"); } void foo () { a = 0;

[Bug c/67769] New: VRP pass does wrong optimization

2015-09-29 Thread bmei at broadcom dot com
Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Target Milestone: --- #include static int clamp (int x, int lo, int hi) { return (x < lo) ? lo : ((x > hi) ? hi : x); } __attribute__((noinline)) short foo (int N) { short value = clamp (N,

[Bug c/65219] New: GCC wrongly deletes a function which is not completely inlined.

2015-02-26 Thread bmei at broadcom dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Compile the following code with gcc 5.0 ( Target: x86_64-unknown-linux-gnu gcc version 5.0.0 20150226 (experimental) [trunk revision 143368] (GCC)) ~/scratch/install

[Bug lto/61868] -frandom-seed always results in random_seed of 0

2014-07-31 Thread bmei at broadcom dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61868 Bingfeng Mei bmei at broadcom dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug lto/61868] -frandom-seed always results in random_seed of 0

2014-07-29 Thread bmei at broadcom dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61868 Bingfeng Mei bmei at broadcom dot com changed: What|Removed |Added Component|driver |lto --- Comment

[Bug driver/61868] New: -frandom-seed always results in random_seed of 0

2014-07-21 Thread bmei at broadcom dot com
: driver Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Compile any simple file with -frandom-seed and -flto option. #include stdio.h extern int foo (int); int bar (int a) { return a * 5; } int main () { printf(%d\n, foo (100)); return 0

[Bug tree-optimization/60012] New: Vectorizer generates unnecessary loop versioning for alias

2014-01-31 Thread bmei at broadcom dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com typedef struct { short real; short imag; } complex16_t; void libvector_AccSquareNorm_ref (unsigned long long *acc

[Bug tree-optimization/59651] [4.9 Regression] Vectorizer failing to spot dependence causes incorrect code generation.

2014-01-02 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59651 --- Comment #5 from Bingfeng Mei bmei at broadcom dot com --- Created attachment 31559 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31559action=edit initial patch Hi, Tejas, vect_create_cond_for_alias_checks contains a bug in handling

[Bug tree-optimization/59651] Vectorizer failing to spot dependence causes incorrect code generation.

2013-12-31 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59651 --- Comment #1 from Bingfeng Mei bmei at broadcom dot com --- That is interesting. On x86-64, GCC does say it cannot determine dist vector between a[3] a[b] and needs run-time aliasing test. In the end it gives up due to too few iterations

[Bug tree-optimization/59651] [4.9 Regression] Vectorizer failing to spot dependence causes incorrect code generation.

2013-12-31 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59651 --- Comment #3 from Bingfeng Mei bmei at broadcom dot com --- I can reproduce on aarch64. Still try to understand why. I constructed a similar test but with positive loop step. extern void abort (void); int a[] = { 6, 0, 0, 0 }; int b; int main

[Bug tree-optimization/53947] [meta-bug] vectorizer missed-optimizations

2013-12-30 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 Bug 53947 depends on bug 59544, which changed state. Bug 59544 Summary: Vectorizing store with negative step http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59544 What|Removed |Added

[Bug tree-optimization/59544] Vectorizing store with negative step

2013-12-30 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59544 Bingfeng Mei bmei at broadcom dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED

[Bug middle-end/59569] [4.9 Regression] r206148 causes internal compiler error: in vect_create_destination_var, at tree-vect-data-refs.c:4294

2013-12-23 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59569 --- Comment #8 from Bingfeng Mei bmei at broadcom dot com --- Sorry for the regression. The assertion happens if storing a constant value with negative step. Doing permutation of constant is not the best optimization here. So the easy way to fix

[Bug middle-end/59569] [4.9 Regression] r206148 causes internal compiler error: in vect_create_destination_var, at tree-vect-data-refs.c:4294

2013-12-23 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59569 --- Comment #9 from Bingfeng Mei bmei at broadcom dot com --- Seems simple patch is to just bypass permutation for constant operand as vec_oprnd is a constant vector with identical elements. Index: tree-vect-stmts.c

[Bug tree-optimization/59544] New: Vectorizing store with negative stop

2013-12-18 Thread bmei at broadcom dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Created attachment 31467 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=31467action=edit The patch against r206016 I was looking at some loops that can be vectorized by LLVM, but not GCC. One

[Bug tree-optimization/59249] if-conversion doesn't handle basic-blocks with only critical predecessor edges

2013-11-26 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59249 --- Comment #4 from Bingfeng Mei bmei at broadcom dot com --- Even I split one critical predecessor edge, predicate of BB6 is still ORed result of two conditions from BB4 BB5. ORing two conditions results in a sequence of statements that cannot

[Bug tree-optimization/59249] if-conversion doesn't handle basic-blocks with only critical predecessor edges

2013-11-25 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59249 --- Comment #3 from Bingfeng Mei bmei at broadcom dot com --- Richard, I am not sure I understand about how to split edge. BB4 / \ / \ BB5| |\| | \ | | \ | | BB6 | / | / BB7 Compiler

[Bug tree-optimization/59249] New: Jump threading makes if-conversion and following vectorization impossible.

2013-11-22 Thread bmei at broadcom dot com
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com I am doing some investigation on loops can be vectorized by LLVM, but not GCC. One example is loop that contains more than one if-else

[Bug tree-optimization/57512] New: Vectorizer: cannot handle accumulation loop of signed char type

2013-06-03 Thread bmei at broadcom dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: bmei at broadcom dot com Created attachment 30249 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30249action=edit Unvectorized with signed char type. GCC (I used 4.7.2 x86

[Bug tree-optimization/57512] Vectorizer: cannot handle accumulation loop of signed char type

2013-06-03 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57512 --- Comment #1 from Bingfeng Mei bmei at broadcom dot com --- Created attachment 30250 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=30250action=edit Vectorized assembly code with unsigned char type

[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-12-15 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258 --- Comment #7 from Bingfeng Mei bmei at broadcom dot com 2011-12-15 10:18:06 UTC --- Yes, the patch fixes the bug. Thanks.

[Bug rtl-optimization/49157] New: Unnecessary stack save/restore code generated for a leaf function (arm-elf-gcc)

2011-05-25 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49157 Summary: Unnecessary stack save/restore code generated for a leaf function (arm-elf-gcc) Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal

[Bug middle-end/45416] [4.5/4.6/4.7 Regression] Code size regression between 4.6/4.7(4.5) and 4.4 for ARM

2011-04-28 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416 --- Comment #8 from Bingfeng Mei bmei at broadcom dot com 2011-04-28 15:22:26 UTC --- I am currently on vacation until 4/5/2011. I may access my mail irregularly. Cheers, Bingfeng Mei

[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-13 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258 --- Comment #5 from Bingfeng Mei bmei at broadcom dot com 2011-01-13 15:49:23 UTC --- It works. But I have no idea about the debug info issue in your other comment. (In reply to comment #2) After tried patches one-by-one, I believe

[Bug rtl-optimization/47258] New: Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258 Summary: Extra instruction generated in 4.5.2 Product: gcc Version: 4.5.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo:

[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258 --- Comment #1 from Bingfeng Mei bmei at broadcom dot com 2011-01-11 13:38:13 UTC --- Created attachment 22944 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22944 Preprocessed test case

[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258 --- Comment #2 from Bingfeng Mei bmei at broadcom dot com 2011-01-11 16:16:28 UTC --- After tried patches one-by-one, I believe the misoptimization is down to the following patch. Index: tree-ssa-copyrename.c

[Bug c/45834] Redundant inter-loop edges in DDG

2010-10-18 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45834 Bingfeng Mei bmei at broadcom dot com changed: What|Removed |Added CC||richard.guenther

[Bug c/45834] Redundant inter-loop edges in DDG

2010-10-18 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45834 --- Comment #3 from Bingfeng Mei bmei at broadcom dot com 2010-10-18 12:16:59 UTC --- I think that standard specifies that char * may refer to an alias of any object, that's why QImode is different here. But I am not sure whether a restrict

[Bug c/45834] Redundant inter-loop edges in DDG

2010-10-18 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45834 --- Comment #5 from Bingfeng Mei bmei at broadcom dot com 2010-10-18 13:53:37 UTC --- Sure, but we have other means of dealing with that (MEM_ALIAS_SET == 0). Do you mean this check is redundant here ? I dig out the ancient code (from 1997

[Bug c/45416] New: Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com
: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bmei at broadcom dot com GCC host triplet: x86_64-unknown-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45416

[Bug c/45416] Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com
--- Comment #2 from bmei at broadcom dot com 2010-08-26 12:47 --- Sorry, I first observed this on our target. Then I tried to reproduce on x86, but I forgot to turn on optimization flags. It does work for x86. Please delete this report. I will figure out what happen with my target

[Bug c/45416] Code size regression between 4.6(4.5) and 4.4

2010-08-26 Thread bmei at broadcom dot com
--- Comment #3 from bmei at broadcom dot com 2010-08-26 12:55 --- I found I can reproduce the bug with ARM ARM trunk -Os: foo: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. mov r2

[Bug c/45176] restrict qualifier is not used in a manually unrolled loop

2010-08-05 Thread bmei at broadcom dot com
--- Comment #5 from bmei at broadcom dot com 2010-08-05 13:44 --- I tried to apply the patches (this one alone is not enough) Richard suggested. It becomes a chain of too many patches in the end. I am confident any more to apply them to 4.5. -- http://gcc.gnu.org/bugzilla

[Bug c/45176] New: restrict qualifier is not used in a manually unrolled loop

2010-08-04 Thread bmei at broadcom dot com
Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bmei at broadcom dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45176

[Bug c/44365] New: ICE with -fdump-tree-all

2010-06-01 Thread bmei at broadcom dot com
dot org ReportedBy: bmei at broadcom dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44365

[Bug lto/41376] collect2 does not handle static libraries

2010-05-24 Thread bmei at broadcom dot com
--- Comment #8 from bmei at broadcom dot com 2010-05-24 09:31 --- I integrated Dave's patch into LD with some modification (only emit those with LTO sections) and hacked collect2 to support that. The size gain of LTO, our main concern, is quite limited for our application. Large amount

[Bug lto/41376] collect2 does not handle static libraries

2010-05-24 Thread bmei at broadcom dot com
--- Comment #10 from bmei at broadcom dot com 2010-05-24 13:29 --- annotating functions with externally_visible sounds a bit difficult to maintain. Programmer needs to know whether a function is used outside of LTO objects. This can change over time and extra efforts are needed to keep

[Bug lto/41376] collect2 does not handle static libraries

2010-05-04 Thread bmei at broadcom dot com
--- Comment #6 from bmei at broadcom dot com 2010-05-04 16:54 --- So this is a rough first draft of the-kind-of-thing-i-was-thinking-of. We get collect2 to run a dummy link early, and extract the output from the --lto-assist flag to get a list of archive members that we need lto

[Bug middle-end/34668] [4.3 Regression] ICE in find_compatible_field with -combine

2010-03-09 Thread bmei at broadcom dot com
--- Comment #12 from bmei at broadcom dot com 2010-03-09 14:20 --- It seems that this bug still fails on my build: ~/work/install-x86/bin/gcc /projects/firepath/tools/work/bmei/gcc-head/src/gcc/testsuite/gcc.dg/pr34668-1.c --combine -O2 /projects/firepath/tools/work/bmei/gcc-head/src

[Bug tree-optimization/43220] New: Paritially optimized __builtin_save_stack/__builtin_restore_stack causes segmentation fault

2010-03-01 Thread bmei at broadcom dot com
Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bmei at broadcom dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43220

[Bug c/43098] New: ICE in tree-sra.c with floating point exception

2010-02-16 Thread bmei at broadcom dot com
at broadcom dot com GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43098

[Bug rtl-optimization/36712] Inefficient loop unrolling

2009-05-21 Thread bmei at broadcom dot com
--- Comment #6 from bmei at broadcom dot com 2009-05-21 08:38 --- I only submitted small patch before. To add a pass (may need new command-line option, disabling the old rtl-level unrolling) seems to be a big issue to me. Don't know what's procedure. My code also contains my own

[Bug rtl-optimization/36712] Inefficient loop unrolling

2009-05-20 Thread bmei at broadcom dot com
--- Comment #4 from bmei at broadcom dot com 2009-05-20 14:17 --- I implemented a tree-level loop-unrolling pass in our private porting, which takes advantage of later tree ivopt pass. It produces much better code than rtl-level loop unrolling in such scenarios. Not sure whether

[Bug rtl-optimization/36712] New: Inefficient loop unrolling

2008-07-03 Thread bmei at broadcom dot com
Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: bmei at broadcom dot com GCC target triplet: arm-elf-gcc http://gcc.gnu.org/bugzilla