[Bug tree-optimization/114769] [14 Regression] Suspicious code in vect_recog_sad_pattern() since r14-1832

2024-04-19 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114769 --- Comment #3 from Feng Xue --- When half_type is null, and call chain would be: vect_supportable_direct_optab_p (vinfo, sum_type, SAD_EXPR, NULL, ...) -> get_vectype_for_scalar_type (vinfo, NULL) -> get_related_vectype_for_scalar_type

[Bug tree-optimization/114769] New: Suspicious code in vect_recog_sad_pattern()

2024-04-18 Thread fxue at os dot amperecomputing.com via Gcc-bugs
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- This function may contain buggy code, which was introduced due to recent support to the new ABD pattern. It calls "vect_recog_absolute_difference"

[Bug tree-optimization/114440] New: Fail to recognize a chain of lane-reduced operations for loop reduction vect

2024-03-23 Thread fxue at os dot amperecomputing.com via Gcc-bugs
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In a loop reduction path containing a lane-reduced operation (DOT_PROD/SAD/WIDEN_SUM), current

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2024-01-30 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 Feng Xue changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/113326] Optimize vector shift with constant delta on shifting-count operand

2024-01-11 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113326 --- Comment #7 from Feng Xue --- (In reply to Richard Biener from comment #6) > (In reply to Andrew Pinski from comment #5) > > One more thing: > > ``` > > vect_shift_0 = vect_value >> { 0, 1, 2, 3 }; > > vect_shift_1 = vect_value >> { 4, 5,

[Bug target/113326] Optimize vector shift with constant delta on shifting-count operand

2024-01-10 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113326 --- Comment #3 from Feng Xue --- (In reply to Andrew Pinski from comment #1) > Note on aarch64 with SVE, you should be able to generate those constants > without a load, using the index instruction. Ok. Thanks for the note. This still requires

[Bug tree-optimization/113326] New: Optimize vector shift with constant delta on shifting-count operand

2024-01-10 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- For shift by induction variable, loop vectorization could generate a series of vector shifts, whose shifting

[Bug tree-optimization/113104] Suboptimal loop-based slp node splicing across iterations

2024-01-09 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113104 Feng Xue changed: What|Removed |Added Resolution|FIXED |--- Status|RESOLVED

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-29 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 --- Comment #8 from Feng Xue --- https://gcc.gnu.org/pipermail/gcc-patches/2023-December/641547.html

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-26 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 --- Comment #7 from Feng Xue --- > The issue here is that because the "outer" pattern consumes > patt_64 = (int) patt_63 it should have adjusted _2 = (int) _1 > stmt-to-vectorize > as being the outer pattern root stmt for all this logic to work

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-21 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 --- Comment #6 from Feng Xue --- (In reply to Richard Sandiford from comment #5) > > The issue here is that because the "outer" pattern consumes > > patt_64 = (int) patt_63 it should have adjusted _2 = (int) _1 > > stmt-to-vectorize > > as

[Bug tree-optimization/113104] Suboptimal loop-based slp node splicing across iterations

2023-12-21 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113104 --- Comment #2 from Feng Xue --- (In reply to Richard Biener from comment #1) > See my proposal on the mailing list to lift the restriction of sticking to a > single vector size, I think this is another example showing this. If you > use BB

[Bug tree-optimization/113104] New: Suboptimal loop-based slp node splicing across iterations

2023-12-21 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Given a partial vector-sized slp node in loop, code generation would utilize inter-iteration parallelism to archive full

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-20 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 --- Comment #3 from Feng Xue --- The function vect_bb_vectorization_profitable_p resorts to a recursive way to identify scalar use, for this case, setting STMT_VINFO_LIVE_P or not would not change scalar cost computation.

[Bug tree-optimization/113091] Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-20 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113091 --- Comment #2 from Feng Xue --- (In reply to Richard Biener from comment #1) > It's the logic > > FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt_info) > { > if (svisited.contains (stmt_info)) > continue; >

[Bug tree-optimization/113091] New: Over-estimate SLP vector-to-scalar cost for non-live pattern statement

2023-12-20 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Gcc fails to vectorize the below testcase on aarch64. int test(unsigned array[8]); int foo(char

[Bug target/106671] aarch64: BTI instruction are not inserted for cross-section direct calls

2023-08-02 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106671 Feng Xue changed: What|Removed |Added CC||fxue at os dot amperecomputing.com

[Bug tree-optimization/109427] New: Wrong param description in param.opt

2023-04-05 Thread fxue at os dot amperecomputing.com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- -param=vect-induction-float= Common Joined UInteger Var(param_vect_induction_float) Init(1) IntegerRage(0, 1) Param Optimization ^^^

[Bug ipa/108445] Address expression on global variable is not normalized

2023-01-18 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108445 --- Comment #1 from Feng Xue --- Created attachment 54297 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54297=edit testcase

[Bug ipa/108445] New: Address expression on global variable is not normalized

2023-01-18 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 54296 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54296=e

[Bug rtl-optimization/108117] Wrong instruction scheduling on value coming from abnormal SSA

2022-12-15 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108117 --- Comment #8 from Feng Xue --- (In reply to Andrew Pinski from comment #7) > (In reply to Feng Xue from comment #6) > > (In reply to Andrew Pinski from comment #2) > > > https://en.cppreference.com/w/c/program/setjmp > > > > I think that

[Bug rtl-optimization/108117] Wrong instruction scheduling on value coming from abnormal SSA

2022-12-15 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108117 --- Comment #6 from Feng Xue --- (In reply to Andrew Pinski from comment #2) > https://en.cppreference.com/w/c/program/setjmp I think that most programmers are not aware of this, neither I for sure. Usage of volatile here is not that intuitive

[Bug rtl-optimization/108117] New: Wrong instruction scheduling on value coming from abnormal SSA

2022-12-14 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Compile the following code with "-O2" on AArch64. #include #include jmp_buf ex_buf; __attribute__

[Bug tree-optimization/107828] tree-inlining would generate SSA with incorrect def stmt

2022-12-13 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107828 Feng Xue changed: What|Removed |Added Resolution|INVALID |--- Status|RESOLVED

[Bug lto/107829] New: Trivial compile time tracking code

2022-11-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- In the function "materialize_cgraph" of lto.cc: /* Start the appropriate timer depending on the mo

[Bug tree-optimization/107828] New: tree-inlining would generate SSA with incorrect def stmt

2022-11-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In the function "remap_gimple_op_r" of tree-inlining.cc: ... if (TREE_CODE (*tp) == SSA_NAME) {

[Bug tree-optimization/107818] New: Overflow of linemap breaks its chronological order

2022-11-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Large-size source codes might exceed representation space of linemap. When this happens, UNKNOWN_LOCATION(0) would inserted to the end of linemap

[Bug ipa/107670] New: Suspicious redundant code in ipa-cp

2022-11-13 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Function "ipa_prop_read_jump_functions()" in ipa-prop.c: ipa_check_create_node_params (); ipa_check_create

[Bug tree-optimization/107066] Field initialized before ctor is mis-optimized away by DSE

2022-09-28 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107066 --- Comment #3 from Feng Xue --- Got it. Thanks for that.

[Bug tree-optimization/107066] New: Field initialized before ctor is mis-optimized away by DSE

2022-09-28 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- By means of user-defined new operator, it is possible that a field is initialized before constructor. #include

[Bug ipa/102513] [10/11/12 Regression] Many false positive warnings with recursive function

2022-02-14 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102513 --- Comment #10 from Feng Xue --- (In reply to Martin Jambor from comment #8) > I am about to thest the following patch. In longer-run, it would be better > to never generate lattice values outside of the value_range but there is an > ordering

[Bug ipa/104377] Unreachable code in create_specialized_node of ipa-prop.c?

2022-02-14 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104377 --- Comment #4 from Feng Xue --- (In reply to Martin Jambor from comment #2) > (In reply to Feng Xue from comment #1) > > > > OK. I does missed something. Here we could not hold assumption that > > ipcp_decision_stage() only sees raw cgraph

[Bug tree-optimization/102513] [10/11/12 Regression] Many false positive warnings with recursive function

2022-02-05 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102513 Feng Xue changed: What|Removed |Added CC||fxue at os dot amperecomputing.com

[Bug ipa/104377] Unreachable code in create_specialized_node of ipa-prop.c?

2022-02-04 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104377 --- Comment #1 from Feng Xue --- (In reply to Feng Xue from comment #0) > For function create_specialized_node(), the "node" to operated on seems > always to be an original cgraph node, never a clone node. From call graph > related to the

[Bug ipa/104377] New: Unreachable code in create_specialized_node of ipa-prop.c?

2022-02-03 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- For function create_specialized_node(), the "node" to operated on se

[Bug tree-optimization/103786] New: Suspicious code in verify_type

2021-12-21 Thread fxue at os dot amperecomputing.com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- tree ct = TYPE_CANONICAL (t); if (!ct) ; else if (TYPE_CANONICAL (t) != ct) ^ should be ct?

[Bug tree-optimization/100802] VRP fails to fold comparison using known value orders

2021-11-15 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100802 Feng Xue changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #2 from Feng Xue ---

[Bug bootstrap/102681] [12 Regression] AArch64 bootstrap failure

2021-10-14 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102681 --- Comment #4 from Feng Xue --- (In reply to Martin Sebor from comment #3) > Simply initializing the variable as in the patch below avoids the warning. > The control flow in the code is sufficiently opaque to make it worthwhile > from a

[Bug tree-optimization/102681] New: AArch64 bootstrap failure

2021-10-10 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- This occurs after commit "Loosen loop crossing restriction in threader" (ec0124e0acb556cdf5dba0e8d0ca6b69d9537fcc). In function ‘void mark_stack_region_used(p

[Bug tree-optimization/102451] Suspicious null-pointer dereference in delete_dead_or_redundant_call

2021-09-23 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102451 Feng Xue changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/102400] Field might miss initialization in vn_reference_insert_pieces()

2021-09-23 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102400 Feng Xue changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug tree-optimization/102451] Suspicious null-pointer dereference in delete_dead_or_redundant_call

2021-09-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102451 --- Comment #2 from Feng Xue --- (In reply to Richard Biener from comment #1) > Confirmed. Mind fixing it by recording the basic-block index before > removing/replacing? OK.

[Bug tree-optimization/102451] New: Suspicious null-pointer dereference in delete_dead_or_redundant_call

2021-09-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In the code snippet: if (lhs) { if (gsi_replace (gsi, new_stmt, true

[Bug tree-optimization/102400] New: Field might miss initialization in vn_reference_insert_pieces()

2021-09-18 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- There is no initialization for vr1->result_vdef, and it may contain non-zero garbage value.

[Bug c++/102214] New: ICE when compiling local class with -fno-weak

2021-09-06 Thread fxue at os dot amperecomputing.com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Created attachment 51413 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51413=edit testcase Compiling attached testcase with option "-flto -O3 -

[Bug ipa/101502] Inconsistent behavior in maybe_record_node()

2021-07-23 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101502 --- Comment #2 from Feng Xue --- (In reply to Martin Liška from comment #1) > @Honza: Can you please take a look? > @Feng: Do you have a test-case for it, please? No. I just got this from code logic, but not 100% sure.

[Bug ipa/101502] New: Inconsistent behavior in maybe_record_node()

2021-07-19 Thread fxue at os dot amperecomputing.com via Gcc-bugs
: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- For code snippet in maybe_record_node(), behavior might be inconsistent when SANITIZE_UNREACHABLE is turned on. Suppose

[Bug tree-optimization/100802] New: VRP fails to fold comparison with known value orders

2021-05-27 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In the case below, it is obvious that we have value orders as i < a <= b inside loop. So "if (i >= b)" could be optimized

[Bug c++/100580] New: ICE with -fdump-passes

2021-05-12 Thread fxue at os dot amperecomputing.com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Created attachment 50805 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50805=edit Source file Reproduce ICE using the command: g++ -fpreprocessed TimeControl.ii -std=c++98 -fd

[Bug tree-optimization/100222] New: Redundant mark_irreducible_loops () in predicate.c

2021-04-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Found two places that redundant mark_irreducible_loops() is called after loop_optimizer_init (LOOPS_NORMAL), since "LOOPS_NORMAL&quo

[Bug ipa/99951] Dead return value after modify_call() is not released

2021-04-07 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99951 --- Comment #2 from Feng Xue --- Can we report error in verify_ssa() when a non-default SSA's defining statement has NULL bb, which is always a case that the statement is removed somewhere?

[Bug ipa/99951] New: Dead return value after modify_call() is not released

2021-04-07 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- By ipa_param_adjustments::modify_call(), a call statement with return value might be replaced to a new void

[Bug ipa/98815] Redundant free_dominance_info in cgraph_node::analyze()

2021-01-25 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98815 --- Comment #2 from Feng Xue --- If we step into free_dominance_info(dir), it is a wrapper of free_dominance_info (cfun, dir), which means it assumes a non-NULL "cfun". Additionally, please go through calling stack of free_dominance_info():

[Bug tree-optimization/98815] New: Redundant free_dominance_info in cgraph_node::analyze()

2021-01-25 Thread fxue at os dot amperecomputing.com via Gcc-bugs
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Since "execute_pass_list ()" has an action of clearing dominance information, two free_dominance_info() afte

[Bug rtl-optimization/98782] IRA artificially creating spills due to BB frequencies

2021-01-22 Thread fxue at os dot amperecomputing.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98782 Feng Xue changed: What|Removed |Added CC||fxue at os dot amperecomputing.com

[Bug tree-optimization/97066] [11 Regression] regression caused by r11-3207

2020-09-16 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97066 --- Comment #1 from Feng Xue --- Both cases will be simplified with new pattern, and this is correct. Will change test code to make that not happen.

[Bug tree-optimization/94234] missed ccp folding for (addr + 8 * n) - (addr + 8 * (n - 1))

2020-09-15 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94234 Feng Xue changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug tree-optimization/92712] [8/9 Regression] Performance regression with assumed values

2020-09-01 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92712 Feng Xue changed: What|Removed |Added CC||fxue at os dot amperecomputing.com

[Bug tree-optimization/94352] New: Suspicious code in tree-ssa-propagate.c

2020-03-27 Thread fxue at os dot amperecomputing.com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In function ssa_propagation_engine::ssa_propagate(), a call chain below might lead to a reference to uninitialized data. ssa_propagate() -> ssa_prop_i

[Bug tree-optimization/94234] New: missed ccp folding for (addr + 8 * n) - (addr + 8 * (n - 1))

2020-03-20 Thread fxue at os dot amperecomputing.com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- CCP could not fold the following expression to a constant "8": size_t foo (char *a, size_t n) { char *

[Bug tree-optimization/93023] New: give preference to address iv without offset in ivopts

2019-12-20 Thread fxue at os dot amperecomputing.com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- >From address IVs with same base and index, ivopts always pick up one with non-zero offset. This does not incur extra cost on architecture l

[Bug tree-optimization/93004] New: Suspicious code in tree-ssa-loop-ivopts.c

2019-12-18 Thread fxue at os dot amperecomputing.com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- In function determine_group_iv_cost_address(), /* Uses in a group can share setup code, so only add setup cost once. */ cost -= cost.scratch

[Bug tree-optimization/92862] New: Suspicious codes in tree-ssa-loop-niter.c and predict.c

2019-12-08 Thread fxue at os dot amperecomputing.com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Function loop_only_exit_p() in tree-ssa-loop-niter.c: for (i = 0; i < loop->num_nodes; i++) { fo

[Bug tree-optimization/92839] New: Normalize memory address to same base in non-loop code

2019-12-06 Thread fxue at os dot amperecomputing.com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- If possible, IVOPTs can transform memory accesses to make them use same base, which can decrease register pressure in loop. But it does

[Bug ipa/92133] Support multi versioning on self recursive function

2019-12-02 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92133 --- Comment #11 from Feng Xue --- --param ipa-cp-eval-threshold=1 -param ipcp-unit-growth=80 is enough.

[Bug ipa/92133] Support multi versioning on self recursive function

2019-12-02 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92133 --- Comment #9 from Feng Xue --- Ok. For any followups on this, I'll create new tracker.

[Bug tree-optimization/92689] Improve stmt_may_clobber_ref_p_1 on constant memory reference

2019-11-27 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92689 --- Comment #6 from Feng Xue --- Good case. I did missed something, a const pointer does not imply it is restrict and for a real const data, we can even create a non-const pointer alias to it by using explicit type cast.

[Bug tree-optimization/92689] Improve stmt_may_clobber_ref_p_1 on constant memory reference

2019-11-27 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92689 --- Comment #2 from Feng Xue --- int fn(); int goo(const int *p) { return fn(); } int data; int foo (const int *p) { int i; int t; data = *p; for (i = 0; i < 100; i++) { int t = *p + 1; goo

[Bug tree-optimization/92689] New: Improve stmt_may_clobber_ref_p_1 on constant memory reference

2019-11-27 Thread fxue at os dot amperecomputing.com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- If ao_ref represents a constant data, stmt_may_clobber_ref_p_1() and call_may_clobber_ref_p() can return false

[Bug ipa/91682] IPA-cp can not propagate value for by-ref argument in form of *arg = param op constant

2019-11-13 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91682 Feng Xue changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug ipa/91088] IPA-cp cost evaluation is too conservative for "if (f(param) cmp const_val)" condition

2019-11-13 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91088 Feng Xue changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug ipa/91089] IPA-cp does not setup proper cost model for switch default case in function versioning

2019-11-13 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91089 Feng Xue changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug ipa/92133] Support multi versioning on self recursive function

2019-11-03 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92133 --- Comment #5 from Feng Xue --- (In reply to Thomas Koenig from comment #4) > Author: tkoenig > Date: Sun Nov 3 22:33:53 2019 > New Revision: 277760 > > URL: https://gcc.gnu.org/viewcvs?rev=277760=gcc=rev > Log: > 2019-11-03 Thomas Koenig

[Bug ipa/92133] Support multi versioning on self recursive function

2019-10-22 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92133 --- Comment #2 from Feng Xue --- (In reply to Martin Liška from comment #1) > Let me take a look. I've created a patch (https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01260.html), could you take a time to review it?

[Bug ipa/92133] New: Support multi versioning on self recursive function

2019-10-17 Thread fxue at os dot amperecomputing.com
Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- For recursive function, IPA does not allow constant propagation on parameter that is used to control recursion

[Bug ipa/91682] New: IPA-cp can not propagate value for by-ref argument in form of *arg = param op constant

2019-09-06 Thread fxue at os dot amperecomputing.com
Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Current IPA only supports CP on by-ref argument assigned

[Bug tree-optimization/91571] New: TBAA does not work for ao_ref created by ao_ref_init_from_ptr_and_size()

2019-08-27 Thread fxue at os dot amperecomputing.com
: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Given a SSA_NAME pointer, its type information is discarded by ao_ref_init_from_ptr_and_size() when

[Bug ipa/91508] New: Segfault due to referencing removed cgraph_node

2019-08-21 Thread fxue at os dot amperecomputing.com
: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Caught a segfault when compiling pr63766.C with debug version gcc. pr63766.C:48:1: internal compiler error

[Bug ipa/91468] New: Suspicious codes in ipa-prop.c and ipa-cp.c

2019-08-15 Thread fxue at os dot amperecomputing.com
: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Some might be a bug, and some might be redundant. ipa-prop.c: In function ipcp_modif_dom_walker::before_dom_children

[Bug ipa/91089] IPA-cp does not setup proper cost model for switch default case in function versioning

2019-08-15 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91089 --- Comment #2 from Feng Xue --- I've already created a patch under review. Please give some comments. Here it is: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00937.html

[Bug ipa/91088] IPA-cp cost evaluation is too conservative for "if (f(param) cmp const_val)" condition

2019-08-15 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91088 --- Comment #3 from Feng Xue --- I've already created a patch under review. Please give some comments. Here it is: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00959.html

[Bug ipa/91194] A suspicious condition in recursive_inlining

2019-07-21 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91194 Feng Xue changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug ipa/91194] New: A suspicious condition in recursive_inlining

2019-07-18 Thread fxue at os dot amperecomputing.com
: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- A piece of code n recursive_inlining()/ipa-inline.c: while (!heap.empty ()) { struct cgraph_edge *curr

[Bug tree-optimization/91090] New: A suspicious code in tree-ssa-dom.c

2019-07-04 Thread fxue at os dot amperecomputing.com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com Target Milestone: --- Find code snippet in simplify_stmt_for_jump_threading (): if (vr->kind () == VR_RANGE) { size_t i, j; find_case_label_ra

[Bug ipa/91089] New: IPA-cp does setup proper cost model for switch default case in function versioning

2019-07-04 Thread fxue at os dot amperecomputing.com
Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- IPA-cp always adds execution cost of switch default case

[Bug ipa/91088] New: IPA-cp cost evaluation is too conservative for "if (f(param) cmp const_val)" condition

2019-07-04 Thread fxue at os dot amperecomputing.com
NCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Current IPA-cp only detects conditional stat

[Bug ipa/90401] Missed propagation of by-ref constant argument to callee function

2019-06-13 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90401 Feng Xue changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug tree-optimization/89713] Optimize away an empty loop whose finiteness can not be analytically determined

2019-06-13 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89713 Feng Xue changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug ipa/90401] Missed propagation of by-ref constant argument to callee function

2019-05-09 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90401 --- Comment #2 from Feng Xue --- (In reply to Richard Biener from comment #1) > Huh. IPA-CP dump difference: > > @@ -26,6 +26,8 @@ > Unknown VR > callsite int caller(int, int&)/2 -> int callee(int&)/1 : > param 0:

[Bug ipa/90401] New: Missed propagation of by-ref constant argument to callee function

2019-05-08 Thread fxue at os dot amperecomputing.com
Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: fxue at os dot amperecomputing.com CC: marxin at gcc dot gnu.org Target Milestone: --- Created attachment 46318 --> https://gcc.gnu.org/bugzilla/attachment.cgi

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #9 from Feng Xue --- (In reply to Feng Xue from comment #5) > > I would say that top-down algorithm behaves better than bottom-up one. I > > implemented Callahan-Koblentz (bottom-up algorithm) in GCC about 10 years > > ago and it

[Bug rtl-optimization/90168] context-sensitive local register allocation

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90168 --- Comment #4 from Feng Xue --- (In reply to Andrew Pinski from comment #3) > >or to use float type to hold frequency? > > This won't work correctly as floating point is different between hosts. > There has been some usage of floating point

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #8 from Feng Xue --- Created attachment 46294 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46294=edit asm file 2 generated by llvm

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #7 from Feng Xue --- Created attachment 46293 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46293=edit asm file 2 generated by gcc

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #6 from Feng Xue --- Created attachment 46292 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46292=edit test case with less live ranges

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-05-05 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #5 from Feng Xue --- > I would say that top-down algorithm behaves better than bottom-up one. I > implemented Callahan-Koblentz (bottom-up algorithm) in GCC about 10 years > ago and it behaved worse than the current one. I think

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-04-24 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #3 from Feng Xue --- Created attachment 46237 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46237=edit test case for aarch64 Add another case composed for aarch64.

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-04-21 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #2 from Feng Xue --- Created attachment 46219 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46219=edit asm file generated by llvm

[Bug rtl-optimization/90174] Bad register spill due to top-down allocation order

2019-04-21 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90174 --- Comment #1 from Feng Xue --- Created attachment 46218 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46218=edit asm file generated by gcc

[Bug rtl-optimization/90168] context-sensitive local register allocation

2019-04-19 Thread fxue at os dot amperecomputing.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90168 --- Comment #2 from Feng Xue --- (In reply to Eric Botcazou from comment #1) > > Supposed a function as the following, in which 'cond', 'S1' and 'S2' are > > completely irrelevant, means they do not access same variables(in term of > > RA, they

  1   2   >