[Bug target/116030] [15 regression] ICE "could not split insn" in final_scan_insn_1, at final.cc on power pc since r15-1576-g6274f10318d053

2025-04-20 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116030 --- Comment #11 from Jiu Fu Guo --- (In reply to Peter Bergner from comment #10) > Testing was clean with the patch updated with Kewen and Sam's suggestions, > so I pushed the commit given Kewen's approval in the patch thread. Hi Peter, thanks!

[Bug target/117007] Poor optimization for small vector constants needed for vector shift/rotate/mask generation

2024-10-28 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117007 --- Comment #8 from Jiu Fu Guo --- (In reply to Peter Bergner from comment #1) > Jeff, did any of your recent constant patches help with this or is this > something different? Vector constant runs into different paths as DImode. Those patches a

[Bug target/116030] [15 regression] ICE "could not split insn" in final_scan_insn_1, at final.cc on power pc since r15-1576-g6274f10318d053

2024-08-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116030 --- Comment #6 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #5) > And the new version: > https://gcc.gnu.org/pipermail/gcc-patches/2024-August/66.html Sorry, -save-temps is still there. As Kewen's comments: https://gcc.gnu.org/

[Bug target/116030] [15 regression] ICE "could not split insn" in final_scan_insn_1, at final.cc on power pc since r15-1576-g6274f10318d053

2024-08-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116030 --- Comment #5 from Jiu Fu Guo --- And the new version: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/66.html

[Bug target/116030] [15 regression] ICE "could not split insn" in final_scan_insn_1, at final.cc on power pc since r15-1576-g6274f10318d053

2024-08-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116030 --- Comment #4 from Jiu Fu Guo --- Submitted a patch as: https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660983.html

[Bug target/96866] ICE in print_operand_address, at config/rs6000/rs6000.c:13560

2024-08-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96866 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/97448] Unneccessary stack frame when using stack protector

2024-08-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97448 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment #2

[Bug target/107757] PPCLE: Inefficient vector constant creation

2024-08-02 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 --- Comment #2 from Jiu Fu Guo --- For the scenario of this PR, the 2insn sequence would be faster than non-prefixed loading. One finding may be useful: when building 64bit constants, I notice that loading may be faster sometimes if the constan

[Bug target/95782] [s390] ICE in _cpp_pop_context

2024-06-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95782 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug target/98140] Reused register by xsmincdp leads to wrong NaN propagation on Power9

2024-05-14 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98140 --- Comment #3 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #2) > (In reply to Alexander Grund from comment #1) > > It looks like this was fixed in 10.1 by this commit > > https://github.com/gcc-mirror/gcc/commit/ > > 37e0df8a9be5a823

[Bug target/96866] ICE in print_operand_address, at config/rs6000/rs6000.c:13560

2024-04-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96866 --- Comment #3 from Jiu Fu Guo --- While, I'm wondering if we could accept this code, and handle it as something like: (insn 5 4 6 (set (reg/f:DI 118) (mem/u/c:DI (unspec:DI [ (symbol_ref/u:DI ("*.LC0") [flags 0x2])

[Bug target/96866] ICE in print_operand_address, at config/rs6000/rs6000.c:13560

2024-04-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96866 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment #2

[Bug target/98140] Reused register by xsmincdp leads to wrong NaN propagation on Power9

2024-04-24 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98140 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment #2

[Bug target/114786] ICE in recog.cc: unrecognizable insn while compiling bcd-3.c for power pc

2024-04-22 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
|RESOLVED CC||guojiufu at gcc dot gnu.org --- Comment #1 from Jiu Fu Guo --- This seems a duplicate of PR100736. *** This bug has been marked as a duplicate of bug 100736 ***

[Bug target/100736] ICE: unrecognizable insn

2024-04-22 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100736 Jiu Fu Guo changed: What|Removed |Added CC||pheeck at gcc dot gnu.org --- Comment #7 f

[Bug target/95782] [s390] ICE in _cpp_pop_context

2024-03-26 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95782 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment #3

[Bug testsuite/106879] [13 regression] new test case gcc.dg/vect/bb-slp-layout-19.c fails

2024-01-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106879 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug middle-end/29215] [4.3 Regression] extra store for memcpy

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29215 Bug 29215 depends on bug 30271, which changed state. Bug 30271 Summary: -mstrict-align can add an store extra for struct argument passing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271 What|Removed |Added -

[Bug other/16996] [meta-bug] code size improvements

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16996 Bug 16996 depends on bug 30271, which changed state. Bug 30271 Summary: -mstrict-align can add an store extra for struct argument passing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271 What|Removed |Added -

[Bug middle-end/101926] [meta-bug] struct/complex/other argument passing and return should be improved

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101926 Bug 101926 depends on bug 30271, which changed state. Bug 30271 Summary: -mstrict-align can add an store extra for struct argument passing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271 What|Removed |Added

[Bug target/30271] -mstrict-align can add an store extra for struct argument passing

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271 Jiu Fu Guo changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/101926] [meta-bug] struct/complex/other argument passing and return should be improved

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101926 Bug 101926 depends on bug 112525, which changed state. Bug 112525 Summary: fail to eliminate unused store https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525 What|Removed |Added

[Bug rtl-optimization/112525] fail to eliminate unused store

2024-01-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug middle-end/113109] [14 Regression] g++ EH tests fail at execution time for cris-elf after r14-6674-g4759383245ac97

2023-12-23 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113109 --- Comment #13 from Jiu Fu Guo --- (In reply to GCC Commits from comment #9) > The master branch has been updated by Hans-Peter Nilsson : > > https://gcc.gnu.org/g:3d03630b123411340e52d05124cb0cacfa1fc8b0 > > commit r14-6817-g3d03630b12341134

[Bug middle-end/113109] [14 Regression] g++ EH tests fail at execution time for cris-elf after r14-6674-g4759383245ac97

2023-12-23 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113109 --- Comment #8 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #6) > So I did a quick audit of the EH_RETURN_HANDLER_RTX and most are registers > rather than a memory location . And the ones which were memory locations > used either

[Bug middle-end/113109] [14 Regression] g++ EH tests fail at execution time for cris-elf after r14-6674-g4759383245ac97

2023-12-23 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113109 --- Comment #7 from Jiu Fu Guo --- (In reply to Hans-Peter Nilsson from comment #3) > > I'm "guessing" that the problem with the patch, is that anything any port > stores through a pointer based on virtual_incoming_args_rtx before > returning,

[Bug target/30271] -mstrict-align can an store extra for struct agrument passing

2023-12-08 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug rtl-optimization/111971] [12/13/14 regression] ICE: maximum number of generated reload insns per insn achieved (90) since r12-6803-g85419ac59724b7

2023-11-22 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111971 Jiu Fu Guo changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug rtl-optimization/112525] fail to eliminate unused store

2023-11-14 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525 --- Comment #6 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #3) > One possible method is fixing DSE to let is able to remove those 'store's. > (but need to take care of the case that is using 'arg_pointer' to pass > parameters.) >

[Bug rtl-optimization/112525] fail to eliminate unused store

2023-11-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525 --- Comment #3 from Jiu Fu Guo --- One possible method is fixing DSE to let is able to remove those 'store's. (but need to take care of the case that is using 'arg_pointer' to pass parameters.) Another method: there is a patch https://gcc.gnu.

[Bug rtl-optimization/112525] fail to eliminate unused store

2023-11-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112525 --- Comment #1 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #0) > For below code: > ``` > typedef struct teststruct > { > double d; > int arr[15]; /* for ppc64le example foo1, 14: foo is just blr. 15: foo has > 8 'std's */ > } te

[Bug rtl-optimization/112525] New: fail to eliminate unused store

2023-11-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For below code: ``` typedef struct teststruct { double d; int arr[15]; /* for ppc64le example foo1, 14: foo is just blr. 15: foo has 8 'std's */ } teststruct

[Bug testsuite/112340] [14 regression] assembler instruction counts off for gcc.target/powerpc/pr106550_1.c

2023-11-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112340 Jiu Fu Guo changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug rtl-optimization/111971] ICE: maximum number of generated reload insns per insn achieved (90)

2023-10-25 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111971 --- Comment #5 from Jiu Fu Guo --- With a bisect, the result shows "85419ac59724b7ce710ebb4acf03dbd747edeea3 is the first bad commit".

[Bug target/108220] ICE: maximum number of generated reload insns per insn achieved (90)

2023-10-24 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108220 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug rtl-optimization/111971] ICE: maximum number of generated reload insns per insn achieved (90)

2023-10-24 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111971 --- Comment #2 from Jiu Fu Guo --- It seems gcc11 is ok.

[Bug rtl-optimization/111971] ICE: maximum number of generated reload insns per insn achieved (90)

2023-10-24 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111971 --- Comment #1 from Jiu Fu Guo --- This issue can be reproduced on 'ppc64' BE machine with -m32.

[Bug rtl-optimization/111971] New: ICE: maximum number of generated reload insns per insn achieved (90)

2023-10-24 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For the below code, an ICE occurs when built with "-m32 -O2". ``` void foo (unsigned long long *a) {

[Bug target/111778] PowerPC constant code change uses an undefined shift

2023-10-11 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111778 --- Comment #2 from Jiu Fu Guo --- Thanks so much for reporting this issue, and thanks for tracing down it! For the code, if 'lz' is 0, it is correct to return false.

[Bug target/94395] Powerpc suboptimal 64-bit constant generation near large values with few bits set

2023-10-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
|RESOLVED CC||guojiufu at gcc dot gnu.org --- Comment #3 from Jiu Fu Guo --- After r14-4470, the trunk could generate a better code for this case.

[Bug target/94393] Powerpc suboptimal 64-bit constant comparison

2023-10-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
||guojiufu at gcc dot gnu.org Status|NEW |RESOLVED --- Comment #9 from Jiu Fu Guo --- After r14-4470, trunk generates better code for this case.

[Bug target/93176] PPC: inefficient 64-bit constant consecutive ones

2023-10-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93176 Jiu Fu Guo changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/106708] [rs6000] 64bit constant generation with oris xoris

2023-10-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106708 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug target/108338] use mtvsrws for lowpart DI->SF conversion on P9

2023-10-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108338 Jiu Fu Guo changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/111597] pattern "(T)(A)+cst -->(T)(A+cst)" cause suboptimal for ppc64

2023-09-26 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111597 --- Comment #3 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #0) > In match.pd there is a pattern: > /* ((T)(A)) + CST -> (T)(A + CST) */ > #if GIMPLE > (simplify >(plus (convert:s SSA_NAME@0) INTEGER_CST@1) > (if (TREE_COD

[Bug target/111597] pattern "(T)(A)+cst -->(T)(A+cst)" cause suboptimal for ppc64

2023-09-26 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111597 --- Comment #1 from Jiu Fu Guo --- While, even without this pattern in match.pd, the generated the sign extend(extsw) is still there. So, just wondering if this sub-optimal asm code would be fixed in another way.

[Bug target/111597] New: pattern "(T)(A)+cst -->(T)(A+cst)" cause suboptimal for ppc64

2023-09-26 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
erity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- In match.pd there is a pattern: /* ((T)(A)) + CST -> (T)(A + CST) */ #if GIMPLE (simplify (plus (conv

[Bug tree-optimization/111495] [14 regression] ICE in lower_bound, at value-range.h:1078 when building LLVM 17.0.1 since r14-3644-g1aceceb1e2d6e8

2023-09-21 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111495 --- Comment #5 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #3) > I suspect r14-4192-g4d80863d7f93c0a839d1fe5 fixed this ... Yes, I reproduced this issue on ppc64le, and the fix r14-4192 seems to work fine.

[Bug tree-optimization/111482] [14 Regression] ice in lower_bound with -O3

2023-09-21 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111482 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/111482] [14 Regression] ice in lower_bound with -O3

2023-09-19 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111482 --- Comment #7 from Jiu Fu Guo --- This is caused by missing to check a vr's "undefine_p". In the pattern "(X + C) / N", (if (exact_mod (c) ... && range_op_handler (PLUS_EXPR).overflow_free_p (vr0, vr1) ...) (plus (op @0

[Bug c++/111482] [14 Regression] ice in lower_bound with -O3

2023-09-19 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111482 --- Comment #6 from Jiu Fu Guo --- I reproduced these issue PR11148 and PR111355 on ppc64le too.

[Bug c++/111482] [14 Regression] ice in lower_bound with -O3

2023-09-19 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111482 --- Comment #5 from Jiu Fu Guo --- Thanks a lot for reporting this!

[Bug tree-optimization/111303] [14 Regression] ICE: in type, at value-range.h:869

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 --- Comment #9 from Jiu Fu Guo --- (In reply to CVS Commits from comment #7) this comment should be linked to PR111324.

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #7 from Jiu Fu Guo --- A comment https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303#c7 should be attached here.

[Bug tree-optimization/111303] [14 Regression] ICE: in type, at value-range.h:869

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 Jiu Fu Guo changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #5 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #2) > Confirmed. > > So using the local range in this case is ok. There might be only a few times > we don't want to use it though in match. Agree, "get_range_query" w

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #4 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #3) > A patch is posted: > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629534.html It is not for this PR. Sorry for typo.

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-10 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #3 from Jiu Fu Guo --- A patch is posted: https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629534.html

[Bug middle-end/111324] More optimization about "(X * Y) / Y"

2023-09-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111324 --- Comment #1 from Jiu Fu Guo --- In match.pd, there is a pattern: /* Simplify (t * 2) / 2) -> t. */ (for div (trunc_div ceil_div floor_div round_div exact_div) (simplify (div (mult:c @0 @1) @1) (if (ANY_INTEGRAL_TYPE_P (type)) (if (T

[Bug middle-end/111324] New: More optimization about "(X * Y) / Y"

2023-09-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
nt: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For case: -- t.c typedef unsigned int INT; INT foo (INT x, INT y) { if (x > 100 || y > 100) return 0; return (x * y) / y; } - gcc -O2 t.

[Bug c/111303] ICE: in type, at value-range.h:869

2023-09-06 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 --- Comment #4 from Jiu Fu Guo --- For the pattern: "(X + C) / N", "op (plus@3 @0 INTEGER_CST@1) INTEGER_CST@2)" where "X" has value-range, and "X + C" does not overflow: && get_range_query (cfun)->range_of_expr (vr0, @0)) && get_range_query (c

[Bug c/111303] ICE: in type, at value-range.h:869

2023-09-06 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 --- Comment #3 from Jiu Fu Guo --- In the pattern of match.pd, there is: && range_op_handler (PLUS_EXPR).overflow_free_p (vr0, vr1) && get_range_query (cfun)->range_of_expr (vr3, @3) /* "X+C" and "X" are not of opp

[Bug c/111303] ICE: in type, at value-range.h:869

2023-09-06 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 Jiu Fu Guo changed: What|Removed |Added Last reconfirmed||2023-09-06 Ever confirmed|0

[Bug c/111303] ICE: in type, at value-range.h:869

2023-09-06 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111303 Jiu Fu Guo changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |guojiufu at gcc dot gnu.org

[Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N

2023-09-03 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/93176] PPC: inefficient 64-bit constant consecutive ones

2023-08-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93176 --- Comment #12 from Jiu Fu Guo --- Thanks a lot for asking! The patch which handles this is submitted at: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/623519.html I would ping this patch again. If ok, I will commit to trunk. (And the

[Bug target/106460] internal compiler error: output_operand: invalid expression as operand on -O1

2023-07-18 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug c++/101853] [12/13/14 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2023-05-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853 --- Comment #17 from Jiu Fu Guo --- > But "nobody" counts that close, so better say "no xtreme-header-* failures > since r13-5702-g72058eea9d407e". :) Since these failures occur erratically, so maybe reopen this or open a new one if the failure

[Bug c++/100052] [11/12/13/14 regression] ICE in compiling g++.dg/modules/xtreme-header-3_b.C after r11-8118

2023-05-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100052 --- Comment #15 from Jiu Fu Guo --- (In reply to seurer from comment #14) > The failures occur erratically so one clean run doesn't mean much. Scanning > the test results mailing list I see failures for this just today in trunk. Yeap, thanks f

[Bug c++/101853] [12/13/14 Regression] g++.dg/modules/xtreme-header-5_b.C ICE

2023-05-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101853 --- Comment #14 from Jiu Fu Guo --- Pass on trunk, gcc-12, gcc-11 for xtreme-header-* cases: make check-gcc-c++ RUNTESTFLAGS="--target_board=unix'{-m64}' modules.exp=xtreme-header-*" === g++ Summary === # of expected passes

[Bug c++/100052] [11/12/13/14 regression] ICE in compiling g++.dg/modules/xtreme-header-3_b.C after r11-8118

2023-05-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100052 --- Comment #13 from Jiu Fu Guo --- Pass on trunk, gcc-12, gcc-11 for xtreme-header-* cases: make check-gcc-c++ RUNTESTFLAGS="--target_board=unix'{-m64}' modules.exp=xtreme-header-*" === g++ Summary === # of expected passes

[Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N

2023-05-12 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757 --- Comment #24 from Jiu Fu Guo --- (In reply to Jiu Fu Guo from comment #23) > /* Simplify ((t + -N*M) / N + M) -> t / N: (t + -C) >> N + (C>>N) ==> t >> N > */ > (for div (trunc_div exact_div) div was not used in this matcher, yet. Here rshif

[Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N

2023-05-11 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757 --- Comment #23 from Jiu Fu Guo --- /* Simplify ((t + -N*M) / N + M) -> t / N: (t + -C) >> N + (C>>N) ==> t >> N */ (for div (trunc_div exact_div) (simplify (plus (rshift (plus @0 INTEGER_CST@1) INTEGER_CST@2) INTEGER_CST@3) (if (INTEGRAL_T

[Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N

2023-05-11 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757 --- Comment #22 from Jiu Fu Guo --- (In reply to Andrew Pinski from comment #21) > (In reply to Jiu Fu Guo from comment #20) > > Interesting thing: > > the VR is always VR_VARYING, even for the below simple case: > > > > typedef unsigned long I

[Bug tree-optimization/108757] We do not simplify (a - (N*M)) / N + M -> a / N

2023-05-11 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108757 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug target/106708] [rs6000] 64bit constant generation with oris xoris

2023-05-10 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106708 --- Comment #3 from Jiu Fu Guo --- With the trunk, for *arg++ = 0x98765432ULL; *arg++ = 0x7cdeab55ULL; are expected. For *arg++ = 0x6543ULL; lis+xoris are not committed to the trunk yet.

[Bug target/93178] PPC: inefficient 64-bit constant generation if msb is off in low 16 bit

2023-05-10 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
|--- |FIXED CC||guojiufu at gcc dot gnu.org --- Comment #4 from Jiu Fu Guo --- On the trunk, the output is expected: li 3,17185 oris 3,3,0x8765 blr

[Bug testsuite/108809] gcc.target/powerpc/builtins-5-p9-runnable.c fails on power 9 BE

2023-05-09 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108809 Jiu Fu Guo changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug testsuite/106879] [13/14 regression] new test case gcc.dg/vect/bb-slp-layout-19.c fails

2023-04-18 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106879 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug target/108809] gcc.target/powerpc/builtins-5-p9-runnable.c fails on power 9 BE

2023-04-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108809 --- Comment #3 from Jiu Fu Guo --- A similar different view between BE and LE on the vector for vec_xst_len_r. For: store_data_uc = (vector unsigned char){ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,

[Bug target/108809] gcc.target/powerpc/builtins-5-p9-runnable.c fails on power 9 BE

2023-04-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108809 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug target/108722] gcc.dg/analyzer/file-CWE-1341-example.c fails on power 9 BE

2023-04-11 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108722 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug target/108338] New: use mtvsrws for lowpart DI->SF conversion on P9

2023-01-08 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
ent: target Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- In a mail-list discussion, https://gcc.gnu.org/pipermail/gcc-patches/2022-December/609054.html, as Segher points out, we could use 'mtvsrws' for the co

[Bug target/103743] PPC: Inefficient equality compare for large 64-bit constants having only 16-bit relevant bits in high part

2023-01-08 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103743 Jiu Fu Guo changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/108073] [rs6000] sub-optimal float member accessing on struct parameter

2022-12-20 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108073 --- Comment #2 from Jiu Fu Guo --- (In reply to Surya Kumari Jangala from comment #1) > Hi Jiu Fu Guo, are you working on this bug? If not, I would like to take > this up. Thanks for your asking! I drafted an experimental patch. Welcome for any

[Bug c/108073] New: [rs6000] sub-optimal float member accessing on struct parameter

2022-12-12 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For the below code: typedef struct DF {double a[4]; long l; } DF; double __attribute__ ((noipa)) foo_df (DF arg){return arg.a[3];} At

[Bug target/106708] [rs6000] 64bit constant generation with oris xoris

2022-12-06 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106708 --- Comment #1 from Jiu Fu Guo --- PR93178 also mentioned the "li,oris" case.

[Bug target/107692] [13 regression] r13-3950-g071e428c24ee8c breaks many test cases

2022-11-18 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107692 --- Comment #7 from Jiu Fu Guo --- (In reply to Hongyu Wang from comment #6) > (In reply to Jiu Fu Guo from comment #4) > cut... > > Yes, I've already posted the patch at > https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606478.html On

[Bug target/107692] [13 regression] r13-3950-g071e428c24ee8c breaks many test cases

2022-11-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107692 --- Comment #5 from Jiu Fu Guo --- > -munroll-only-small-loops does not turn on or off -funroll-loops, and it > should not, so that it does what it says, if nothing else. Yes, and -funroll-loops would win over -munroll-only-small-loops

[Bug target/107692] [13 regression] r13-3950-g071e428c24ee8c breaks many test cases

2022-11-17 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107692 Jiu Fu Guo changed: What|Removed |Added CC||guojiufu at gcc dot gnu.org --- Comment

[Bug libstdc++/107037] New: 541.leela_r compiling fail since r13-2779

2022-09-26 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- When building 541.leela_r from spec2017, I encounter one error: include/c++/13.0.0/bitset: In instantiation of 'void std::_Base_bitset<_Nw>::_M_do_reset()

[Bug target/106550] [rs6000] sub-optimal 64bit constant generation for P10

2022-09-15 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106550 Jiu Fu Guo changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug middle-end/106928] 500.perlbench_r fail(VE) since r13-1933

2022-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106928 --- Comment #3 from Jiu Fu Guo --- (In reply to Martin Liška from comment #2) > I think you missed -fno-finite-math-only option as documented here: > https://www.spec.org/cpu2017/Docs/benchmarks/500.perlbench_r.html#portability Thanks! It pass

[Bug middle-end/106928] 500.perlbench_r fail(VE) since r13-1933

2022-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106928 --- Comment #1 from Jiu Fu Guo --- The out.mis file: 3258: # of abstol errors: 0 Minimum abstol: nan ^ 3259: Maximum reltol: 0.0e+00 # of abstol errors: 0 ^ 3260: # of reltol errors: 0 Maximum reltol: 0.

[Bug middle-end/106928] New: 500.perlbench_r fail(VE) since r13-1933

2022-09-13 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
-end Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- With the latest trunk, the 500.perlbench_r (-Ofast) from spec2017 encounter VE on power9 and power10 on no matter with or without -fno-unsafe-math-optimizations. With

[Bug target/106708] New: [rs6000] 64bit constant generation with oris xoris

2022-08-22 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
Component: target Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- For code: t.c void foo (long *arg) { *arg++ = 0x98765432ULL; *arg++ = 0x7cdeab55ULL; *arg++ = 0x6543ULL; } gcc -O2 -S t.c lis

[Bug target/106550] [rs6000] sub-optimal 64bit constant generation for P10

2022-08-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106550 --- Comment #2 from Jiu Fu Guo --- (In reply to Kewen Lin from comment #1) > Confirmed. > > Clang supports it as: > > https://godbolt.org/z/Kxj584sfd Thanks Kewen! Or another example code could be: pli 9,101736451 (0x6106003) sldi 9,9,32 pa

[Bug target/106550] New: [rs6000] sub-optimal constant generation

2022-08-07 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: guojiufu at gcc dot gnu.org Target Milestone: --- There is 'pli' which supports a 34bits immediate, so to generate a 64bits constant we just need 3 instructions at most. void foo (unsigned long long

[Bug target/106460] internal compiler error: output_operand: invalid expression as operand on -O1

2022-07-27 Thread guojiufu at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106460 --- Comment #1 from Jiu Fu Guo --- The ice occur when output rtx "(high:DI (symbol_ref:DI ("var_48")..))) to constant pool. This rtx is generated at function "recog_for_combine"(in combine.cc) after invoking "force_const_mem". This kind of rtx

  1   2   3   >