d be good to sit
down and see if it needs reworking.. Im pretty sure there is some work
being done over and over we can improve on, but this is good enough for now.
Bootstraps on x86_64-pc-linux-gnu with no regressions. Pushed.
Andrew
From 9808af57ef1d4cbafb40b2446fd6808cbf20b36d Mon Sep
On Tue, Jun 17, 2025 at 5:43 AM Jeff Law wrote:
>
>
>
> On 6/16/25 10:08 PM, Dongyan Chen wrote:
> > Hi, I've come across a question regarding the branch cost of gcc. In the
> > link
> > https://gcc.godbolt.org/z/hnddevd5h, gcc fails to recognize the optimization
> > branch judgment, while llvm d
x86_64-linux and i686-linux, ok for trunk/15.2?
>
LGTM but I can't approve it.
Thanks,
Andrew
> 2025-06-17 Jakub Jelinek
>
> PR tree-optimization/120677
> * gimple-crc-optimization.cc (crc_optimization::optimize_crc_loop):
> Insert before gs
On Wed, Jun 11, 2025, 10:17 PM haochen.jiang
wrote:
> On Linux/x86_64,
>
> dcb9af06212e8bb36e84a1b8498c625c29abeb6f is the first bad commit
> commit dcb9af06212e8bb36e84a1b8498c625c29abeb6f
> Author: Gwenole Beauchesne
> Date: Mon Jun 2 14:44:55 2025 -0700
>
> c/c++: Handle '#pragma GCC ta
On Wed, Jun 11, 2025, 9:24 AM Andrew MacLeod wrote:
>
> On 6/11/25 11:02, Andrew MacLeod wrote:
> >
> > On 6/10/25 17:05, Richard Biener wrote:
> >>
> >>
> >>> Am 10.06.2025 um 22:18 schrieb Andrew MacLeod :
> >>>
> >>>
On 6/11/25 11:02, Andrew MacLeod wrote:
On 6/10/25 17:05, Richard Biener wrote:
Am 10.06.2025 um 22:18 schrieb Andrew MacLeod :
I had a question asked of me, and now I'm passing the buck.
extern void *memcpy(void *, const void *, unsigned int);
extern int memcmp(const
On 6/10/25 17:05, Richard Biener wrote:
Am 10.06.2025 um 22:18 schrieb Andrew MacLeod :
I had a question asked of me, and now I'm passing the buck.
extern void *memcpy(void *, const void *, unsigned int);
extern int memcmp(const void *, const void *, unsigned int);
ty
d in the object file. This
is a reduced testcase to demonstrate a much larger problem.
I don't see this happening on my x86 box. the memcpy's are not lowered
to MEMs there under any circumstances I can find.
This is true for at least gcc13 through trunk. It was not true back in
the heyday of gcc8.
Andrew
On 6/10/25 13:52, Jakub Jelinek wrote:
On Tue, Jun 10, 2025 at 10:51:25AM -0400, Andrew MacLeod wrote:
Edge range should be fine, and really that assert doesnt really need to be
there.
Where the issue could arise is in gimple-range-fold.cc in
fold_using_range::range_of_range_op() where we
On Tue, Jun 10, 2025 at 3:47 AM Richard Biener
wrote:
>
> On Tue, Jun 10, 2025 at 2:02 AM Andrew Pinski wrote:
> >
> > On Mon, Jun 9, 2025 at 2:49 AM Richard Biener
> > wrote:
> > >
> > > On Sun, Jun 8, 2025 at 7:52 PM Andrew Pinski
> > >
n the set focuses on improvements resulting from
better utilizing the bitmask when it is present.
Have I missed anything tricky about switches?
Bootstraps on x86_64-pc-linux-gnu with no regressions. OK for trunk?
Andrew
From f3709725b4656a3b75334c89d14d0f1da40e4be5 Mon Sep 17 00:00:00 2001
gressions. Pushed
Andrew
From ea2cfcbf652c9531aae2af6352c9519d36795cf1 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod
Date: Tue, 10 Jun 2025 12:11:18 -0400
Subject: [PATCH] Check if constant is a member before returning it.
set_range_from_bitmask checks the new bitmask, and if it is a constant,
simpl
On Thu, Jun 5, 2025 at 11:50 PM Jan Beulich wrote:
>
> As per documentation, even 4.7 ought to suffice. At least 4.13 objects
> to there being nothing ahead of the first comma in @xref{}.
> ---
> The text inserted it merely a guess; I'm open to better suggestions.
>
> Noticed with gcc15, so may wa
On 6/10/25 10:07, Jakub Jelinek wrote:
On Tue, Jun 10, 2025 at 09:59:33AM -0400, Andrew MacLeod wrote:
Yes, there are places , particularly fold_using_range in
gimple-range-fold.cc, which expects there to be 2 edges to a GCOND stmt.
it always expects 2 successors. There are not many places
always expects 2 successors. There are not many places like
that, many simply look at the specified edge of a gcond... but the few
there are could also be adjusted pretty easily to check if the edge is
there before doing anything...
Andrew
ory the
program is the "same" so the previously calculated values in the cache
should still be ok. New values would be calculated using the new edge
configuration.
Most of the rest of ranger just walks what is there now. As long as
the use/def chains lead somewhere useful, and the blocks those
statements are in still exist, it should be fine. Also as long as the
rules of not changing the meaning/value of an existing ssa-name are also
followed. Im sure it possible to get into trouble, but as long as it is
controlled it should manage.
Andrew
k the RTL on the edges either).
It only walks SSA use->def chains, I don't think it ever walks
"all stmts" of a block (or edge as you say).
yes, Ranger will just walk the use-def chains, and never looks at
anything queued on an edge or elsewhere.
Andrew
mark is probably not very readable either, so we
can live with it. This is fine for now. Like you said, the whole
cache/atomic thing is a mess that could use a rework.
OK.
Andrew
On Mon, Jun 9, 2025 at 2:49 AM Richard Biener
wrote:
>
> On Sun, Jun 8, 2025 at 7:52 PM Andrew Pinski wrote:
> >
> > While thinking about how to implement the rest of the copy prop and makes
> > sure not
> > to introduce some compile time problems, optimize_agr_c
/ChangeLog:
* gcc.dg/pr118946-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/pr118946-1.c | 15 ++
gcc/tree-ssa-forwprop.cc | 278 --
2 files changed, 167 insertions(+), 126 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/pr118946-1.c
:
* tree-ssa-phiopt.cc (cond_if_else_store_replacement): Move
definitin of else_vdef to right before the usage. Reformat
slightly.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-phiopt.cc | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/gcc/tree
On Sun, Jun 8, 2025 at 2:03 AM Richard Biener
wrote:
>
> On Sat, Jun 7, 2025 at 12:32 AM Andrew Pinski
> wrote:
> >
> > So currently cselim is limited to targets which have conditional move
> > and also happens later in the pipeline. This adds the limited form of
>
e-ssa-phiopt.cc (cond_if_else_store_replacement): Use
get_virtual_phi
instead of inlining it.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-phiopt.cc | 9 +
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc
index 2e4f9d
-forwprop.cc (optimize_agr_copyprop): Change into a
forward looking (looking at vdef's uses) instead of a back
looking (vuse's def).
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 121 +++
1 file changed, 60 inserti
On Sat, Jun 7, 2025 at 12:34 PM Andrew Pinski wrote:
>
> On Fri, Jun 6, 2025 at 11:50 AM Andrew Pinski
> wrote:
> >
> > This improves copy prop for aggregates by working over statements that
> > don't modify the access
> > just like how it is done for cop
/120477
gcc/ChangeLog:
* tree-ssa-math-opts.cc (maybe_optimize_guarding_check): Remove
special case for COND_EXPR.
(arith_overflow_check_p): Likewise.
(match_arith_overflow): Likewise, changing into a gcc_unreachable.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa
On Fri, Jun 6, 2025 at 11:50 AM Andrew Pinski wrote:
>
> This improves copy prop for aggregates by working over statements that don't
> modify the access
> just like how it is done for copying zeros.
> To speed up things, we should only have one loop back on the vuse instead
On Fri, Jun 6, 2025 at 12:02 PM Andrew Pinski wrote:
>
> On Thu, Jun 5, 2025 at 11:39 PM Richard Biener
> wrote:
> >
> > On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski
> > wrote:
> > >
> > > Currently we expand `{}` and store zeros to the stack and t
BITS_PER_WORD, just return the constant 0.
gcc/testsuite/ChangeLog:
* g++.target/aarch64/array-return-1.C: New test.
* g++.target/i386/array-return-1.C: New test.
Signed-off-by: Andrew Pinski
---
gcc/expr.cc | 13 +++
.../g++.target/aarch64
sive-optimizations (should be cleaned
up to say kind of expensiveness, e.g compile time/compile memory
usage).
Thanks,
Andrew
> + && SCALAR_INT_MODE_P (mode)
> + && (GET_MODE_SIZE (as_a (mode))
> + > GET_MODE_SIZE (as_
(Wmusttail-local-addr,
Wno-maybe-musttail-local-addr): Fix opindex.
* common.opt.urls: Regenerate.
Signed-off-by: Andrew Pinski
---
gcc/common.opt.urls | 2 +-
gcc/doc/invoke.texi | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/common.opt.urls b/gcc
: Likewise.
* gcc.dg/tree-ssa/phiprop-2.c: Move the check for MIN_EXPR to phiopt1.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/tree-ssa/phiprop-2.c| 5 +-
gcc/testsuite/gcc.dg/tree-ssa/pr35286.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/split-path-6.c | 2 +-
gcc/testsuite/gcc.dg
(single_trailing_store_in_bb): Add vphi argument.
Check for single use of the vdef of the store instead of a loop
and check vdef's single use statement is the same as vphi.
(cond_if_else_store_replacement): Update call to
single_trailing_store_in_bb.
Signed-off-by: Andrew Pinski
---
gcc/tre
On Thu, Jun 5, 2025 at 11:39 PM Richard Biener
wrote:
>
> On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski
> wrote:
> >
> > Currently we expand `{}` and store zeros to the stack and then do a full
> > mode load back. This is a waste, instead we should just use the ze
geLog:
* gcc.dg/tree-ssa/copy-prop-arg-1.c: New test.
* gcc.dg/tree-ssa/copy-prop-arg-2.c: New test.
Signed-off-by: Andrew Pinski
---
.../gcc.dg/tree-ssa/copy-prop-arg-1.c | 37
.../gcc.dg/tree-ssa/copy-prop-arg-2.c | 35
gcc/tree-ssa-forwpr
On 6/6/25 11:07, Jakub Jelinek wrote:
On Fri, Jun 06, 2025 at 10:54:55AM -0400, Andrew MacLeod wrote:
I don't remember details about the order of things... Is there any chance
that you might query an SSA_NAME whose DEF was in a block which has been
converted to RTL? Ranger will quer
t_range_query (fun)->create_relation_oracle (false);
<>
get_range_query (fun)->destroy_relation_oracle ();
fun->x_range_query = NULL;
As long as all queries come in dominator order, it should work just fine
as an option.
Andrew
On 6/6/25 09:33, Jakub Jelinek wrote:
Hi!
As the foll
On Thu, Jun 5, 2025 at 11:01 PM Kugan Vivekanandarajah
wrote:
>
> Hi Andrew,
>
> > On 6 Jun 2025, at 8:18 am, Andrew Pinski wrote:
> >
> > External email: Use caution opening links or attachments
> >
> >
> > On Wed, Jun 4, 2025 at 12:02 AM Kugan Vive
(cond_if_else_store_replacement_1): Add vphi
argument.
Manually update the vphi and new_stmt vdef/lhs.
(cond_if_else_store_replacement): Update call to
cond_if_else_store_replacement_1.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-phiopt.cc | 15 ---
1 file changed, 12
angeLog:
>
> * gcc.dg/tree-prof/clone-merge-1.c: New test.
This new testcase fails if you don't have autofdo setup.
I think it needs:
/* { dg-require-profiling "-fauto-profile" } */
Thanks,
Andrew Pinski
>
> Is this OK?
>
> Thanks,
> Kugan
>
gcc/ChangeLog:
* expr.cc (store_field): For `{}` exp where bitsize is known
to be less than BITS_PER_WORD, use zero cst.
gcc/testsuite/ChangeLog:
* g++.target/aarch64/array-return-1.C: New test.
* g++.target/i386/array-return-1.C: New test.
Signed-off-by: Andrew
fied, while
the latter PASSed both versions.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK by me.
Andrew
r a new one, or the existing one, but are
guaranteed a context ranger.
Does that seem reasonable?
Andrew
pdate - in install.texi:
https://gcc.gnu.org/install/configure.html#with-multilib-list
[We had only updated:
https://gcc.gnu.org/install/specific.html#amdgcn-x-amdhsa ]
OK for mainline - and for backporting to GCC 15?
OK
Andrew
add a testcase.
Tested for aarch64-linux-gnu.
PR tree-optimization/89606
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/vld2-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.target/aarch64/vld2-1.c | 45 +++
1 file changed, 45 insertions(
On Wed, Jun 4, 2025 at 6:27 AM Richard Biener
wrote:
>
> On Thu, May 29, 2025 at 10:04 AM wrote:
> >
> > From: Dhruv Chawla
> >
> > This patch folds the following patterns:
> > - max (a, add (a, b)) -> [sum, ovf] = addo (a, b); !ovf ? sum : a
> > - max (a, sub (a, b)) -> [sum, ovf] = subo (a, b)
Fine with me. I don't think Aldy got to many of the cast conversions.
Andrew
On 6/3/25 03:31, Jakub Jelinek wrote:
Hi!
I've noticed we don't even support say float -> double and other
scalar floating point to scalar floating point conversions in the
ranger, we just end u
rhaps the functions changed
name or something.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
OK. I suspect it was from cut'n'paste when floats were first
created... but regardless, should be fixed.
Andrew
On Tue, Jun 3, 2025 at 10:43 PM H.J. Lu wrote:
>
> On Tue, Jun 3, 2025 at 10:51 AM Andrew Pinski
> wrote:
> >
> > When we have a smallish CSWTCH, it could be placed in the rodata.cst16
> > section so it can be merged with other constants across TUs.
> >
> >
.
gcc/ChangeLog:
* opt-functions.awk (opt_args): Print an error
if there is no match for NAME but there is a match
for different case name.
Signed-off-by: Andrew Pinski
---
gcc/opt-functions.awk | 10 ++
1 file changed, 10 insertions(+)
diff --git a/gcc/opt
On Tue, Jun 3, 2025 at 11:18 AM Martin Uecker wrote:
>
> Am Dienstag, dem 03.06.2025 um 10:56 -0700 schrieb Andrew Pinski:
> > On Tue, Jun 3, 2025 at 10:45 AM Martin Uecker wrote:
> > >
> > >
> > > This version only contains the fix for -Wc++-compat.
>
s_init) Warning LangEnabledby(C
ObjC,Wc++-compat)
1 | #error incorrect case of 'LangEnabledBy' during parsing of C
ObjC Var(warn_jump_misses_init) Warning LangEnabledby(C
ObjC,Wc++-compat)
| ^
```
Which should be a good hint of what is going wrong.
Thanks,
Andrew
>
>
and should be backported to the
open branches too as it was working with GCC 4.7.0 and was only broken
with r0-116778-gf2bc201f53e2b8 which introduced the typo.
Thanks,
Andrew Pinski
>
> Bootstrapped and regression tested for x86_64.
>
> Martin
>
>
> c: Enable -Wjump-misses-init
supporting --param in the
attributes/pragmas,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116092 . It might be easy
to add the support there too.
Note this is not to stop adding an -m option which is considered more
stable than the --param option but rather to let you know there is a
bug about allowing
decls.
PR tree-optimization/120451
gcc/ChangeLog:
* tree-switch-conversion.cc (switch_conversion::build_one_array): Mark
the newly created decl as mergable.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/cswtch-6.c: New test.
Signed-off-by: Andrew Pinski
---
gcc
-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/tree-ssa/phiprop-2.c | 28 +++
1 file changed, 28 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/phiprop-2.c
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phiprop-2.c
b/gcc/testsuite/gcc.dg/tree-ssa/phiprop-2.c
new file
get/i386/vect-pragma-target-2.C: New test.
* gcc.target/i386/vect-pragma-target-1.c: New test.
* gcc.target/i386/vect-pragma-target-2.c: New test.
Signed-off-by: Gwenole Beauchesne
Co-authored-by: Andrew Pinski
---
gcc/c-family/c-pragma.cc | 4 +-
...
claration.
Yes and this was mentioned while I was fixing PR 115605
(https://inbox.sourceware.org/gcc-patches/5d1efe6a-d2f2-4b37-aa92-ce3a73739...@redhat.com/).
I didn't get some time to look into changing that yet.
Iain, if you look into fixing lookup_template_class, check the
testcases for PR
On 02/06/2025 15:40, Tobias Burnus wrote:
Hi Andrew,
Andrew Stubbs wrote:
The hsa_memory_copy API is known to be slow, so for smaller data sizes
it's probably better to have one hsa_memory_copy replace the whole
memset than use three API calls, even with setting up some host-side
memo
y, e.g. via
requires unified_shared_memory/self_maps). For nvptx, cuMemsetD8
is used and for AMD GPUs hsa_amd_memory_fill. However, the latter
only supports 4byte aligned data, working in multiples of 4byte.
@Sandra: Any .texi comments? (Or generic comments.)
@Thomas, Jakub, anyone: Any comment?
@Andrew, an
prop1.
* gcc.dg/tree-ssa/pr57361-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/g++.dg/opt/pr66119.C| 2 +-
.../execute/builtins/pr22237-1-lib.c | 27 ++
.../execute/builtins/pr22237-1.c | 57
gcc/testsuite/gcc.dg/tree-ssa/200
On Sun, Jun 1, 2025 at 3:54 AM Richard Biener
wrote:
>
> On Sat, May 31, 2025 at 8:41 PM Andrew Pinski
> wrote:
> >
> > Currently gimple_folder::convert_and_fold calls create_tmp_var; that means
> > while in ssa form,
> > the pass which calls fold_stmt will a
ad of create_tmp_var for the temporary. Add comment about callback
argument.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/aarch64-sve-builtins.cc | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc
b/gcc/config/aarch64/aarch6
definition is before the first use.
(pass_forwprop::execute): Likewise for complex loads.
(pass_data_forwprop): Remove TODO_update_ssa.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/tree-ssa
geLog:
* config/aarch64/aarch64-sve-builtins.cc
(gimple_folder::convert_and_fold): Use create_tmp_reg_or_ssa_name
instead of create_tmp_var for the temporary.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/aarch64-sve-builtins.cc | 2 +-
1 file changed, 1 insertion(
-ssa-dce.cc (perform_tree_ssa_dce): Set TODO_update_ssa
only when cfg has changed
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-dce.cc | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc
index ba9cd6536ae..f5e67c4409a 100644
cp.cc (insert_clobber_before_stack_restore): Update the
virtual
op on the inserted clobber and the stack restore function.
(do_ssa_ccp): Don't add TODO_update_ssa to the todo.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-ccp.cc | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff -
s_data_early_vrp): Remove TODO_verify_all.
(pass_data_fast_vrp): Likewise.
Signed-off-by: Andrew Pinski
---
gcc/function.h| 1 -
gcc/gimple-harden-conditionals.cc | 6 ++
gcc/gimple-harden-control-flow.cc | 3 +--
gcc/ipa-strub.cc
small typo, missing n at the end of function.
Pushed as obvious after a bootstrap/test.
gcc/ChangeLog:
* passes.cc (execute_all_ipa_transforms): Fix typo in
commenet.
Signed-off-by: Andrew Pinski
---
gcc/passes.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
ild_minmax_replacement_statements (stmt, ovf, new_lhs,
> + type, use_stmt));
> + }
See above about reusing/removing this statement.
> else
> {
> gimple_assign_set_rhs1 (use_stmt, ovf);
> @@ -4854,11 +4978,16 @@ match_arith_overflow (gimple_stmt_iterator *gsi,
> gimple *stmt,
> }
> else
> {
> - gcc_checking_assert (gimple_assign_rhs_code (use_stmt)
> - == COND_EXPR);
> - tree cond = build2 (ovf_use == 1 ? NE_EXPR : EQ_EXPR,
> - boolean_type_node, ovf,
> - build_int_cst (type, 0));
> + tree_code rhs_code = gimple_assign_rhs_code (use_stmt);
> + gcc_checking_assert (rhs_code == COND_EXPR || rhs_code ==
> MAX_EXPR
> + || rhs_code == MIN_EXPR);
> + tree cond = NULL_TREE;
> + if (rhs_code != COND_EXPR)
> + cond = build_minmax_replacement_statements (stmt, ovf,
> new_lhs,
> + type, use_stmt);
> + else
> + cond = build2 (ovf_use == 1 ? NE_EXPR : EQ_EXPR,
> + boolean_type_node, ovf, build_int_cst (type,
> 0));
Note COND_EXPR no longer has the possibility of a condition part of it
(since r13-707-g68e0063397ba82) so this code will be removed soon
(PR120477 records this dead code). So I think my mention about reusing
the lhs and replacing statements applies here too. Also are you sure
this produces the correct resolve for MIN/MAX?
Because I think we would produce:
+ _7 = .(ADD|SUB)_OVERFLOW (a, b);
+ _8 = REALPART_EXPR <_7>;
+ _9 = IMAGPART_EXPR <_7>;
+ _10 = _9 != 0; (or _9 == 0)
+ _11 = _10 ? _8 : a;
_res = MIN/MAX(_11, _8)
Which will give the same value but I suspect you wanted to remove the
MIN/MAX here too.
Thanks,
Andrew
> gimple_assign_set_rhs1 (use_stmt, cond);
> }
> }
> --
> 2.44.0
>
::replace_scc_by_value): Return
true
if something was done.
(scc_copy_prop::propagate): Return true if something was changed.
(pass_sccopy::execute): Return TODO_cleanup_cfg if a prop happened.
Signed-off-by: Andrew Pinski
---
gcc/gimple-ssa-sccopy.cc | 20
1 file
On Tue, May 27, 2025 at 5:14 AM Richard Biener
wrote:
>
> On Tue, May 27, 2025 at 5:02 AM Andrew Pinski
> wrote:
> >
> > This was noticed in the review of copy propagation for aggregates
> > patch, instead of checking for a NULL or a non-ssa name of vuse,
> >
On Mon, May 26, 2025 at 1:40 PM Andrew Pinski wrote:
> > Note this is redundant store removal - I'm not sure operand_equal_p
> > is good enough to catch all cases of effective type changes done?
> > Esp. as infering the old effective type from the read side (src2)
> &g
On Fri, May 23, 2025 at 10:12 PM Andrew Pinski wrote:
>
> This improves copy prop for aggregates by working over statements that don't
> modify the access
> just like how it is done for copying zeros.
> To speed up things, we should only have one loop back on the vuse in
On Mon, May 26, 2025 at 1:40 PM Andrew Pinski wrote:
>
> On Mon, May 26, 2025 at 5:36 AM Richard Biener
> wrote:
> >
> > On Sun, May 18, 2025 at 10:58 PM Andrew Pinski
> > wrote:
> > >
> > > This implements a simple copy propagation for aggregates
(optimize_memcpy_to_memset): Change check
from NULL/non-ssa name to default name.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index 4c048a9a298
hen the statement changed.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index e457a69ed48..81ea7d4195e 100644
--- a/gcc/tree-ssa-forwprop.cc
+++ b/gcc/tree-ssa-forwprop.cc
@@ -132
On Mon, May 26, 2025 at 1:40 PM Andrew Pinski wrote:
>
> On Mon, May 26, 2025 at 5:36 AM Richard Biener
> wrote:
> >
> > On Sun, May 18, 2025 at 10:58 PM Andrew Pinski
> > wrote:
> > >
> > > This implements a simple copy propagation for aggregates
On Mon, May 26, 2025 at 5:36 AM Richard Biener
wrote:
>
> On Sun, May 18, 2025 at 10:58 PM Andrew Pinski
> wrote:
> >
> > This implements a simple copy propagation for aggregates in the similar
> > fashion as we already do for copy prop of zeroing.
> >
>
On Mon, May 26, 2025 at 4:57 AM Christophe Lyon
wrote:
>
> ,,
>
> On Mon, 26 May 2025 at 12:54, Andrew Pinski (QUIC)
> wrote:
> >
> > > -Original Message-
> > > From: Christophe Lyon
> > > Sent: Monday, May 26, 2025 3:09 AM
>
> -Original Message-
> From: Christophe Lyon
> Sent: Monday, May 26, 2025 3:09 AM
> To: Andrew Pinski (QUIC)
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] testsuite: Fix pr101145inf*.c testcases
> [PR117494]
>
> Hi Andrew,
>
> On Sun, 17 Nov 2024
GS=u,k
> >> + shift
> >> +fi
> >> +
> >> +if [ "$use_brbe" = true ] ; then
> >> + if grep -q hypervisor /proc/cpuinfo ; then
> >> +echo >&2 "Warning: branch profiling may not be functional in VMs"
> >> +
On Fri, May 23, 2025 at 2:39 AM Richard Biener
wrote:
>
> On Thu, May 22, 2025 at 3:11 AM Jeff Law wrote:
> >
> >
> >
> > On 5/18/25 10:38 AM, Andrew Pinski wrote:
> > > While working on improving forwprop and removal of
> > > forward_propagate_in
test.
* gcc.dg/tree-ssa/copy-prop-arg-2.c: New test.
* gcc.dg/tree-ssa/copy-prop-arg-3.c: New test.
Signed-off-by: Andrew Pinski
---
.../gcc.dg/tree-ssa/copy-prop-arg-1.c | 37 +
.../gcc.dg/tree-ssa/copy-prop-arg-2.c | 35
.../gcc.dg/tree-ssa/copy-prop-arg-3.c
On 9/29/23 16:17, Jeff Law wrote:
On 9/5/23 01:12, Andrew Pinski wrote:
On Mon, Sep 4, 2023 at 11:06 PM Jeff Law via Gcc-patches
wrote:
On 9/1/23 11:30, Andrew Pinski via Gcc-patches wrote:
So it turns out there was a simplier way of starting to
improve VRP to start to fix PR 110131
On Wed, May 21, 2025 at 3:21 PM Jeff Law wrote:
>
>
>
> On 5/5/25 3:27 PM, Andrew Pinski wrote:
> > The problem here is simplify-rtx.cc expects gen_lowpart_no_emit
> > to return NULL on failure but combine's hook was returning CLOBBER.
> > After r16-160-ge6f89d
On Tue, May 20, 2025, 1:47 PM Christophe Lyon
wrote:
> Many tests became unsupported on aarch64 when -mcpu=unset was added to
> several arm_* effective targets, because this flag is only supported
> on arm.
>
> Since these effective targets are used on arm and aarch64, the patch
> adds -mcpu=unse
be handled by the cmp
instruction.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/imm_choice_comparison-2.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/aarch64.cc | 7 ++
.../aarch64/imm_choice_comparison-2.c | 90 +++
2 files
choice if dump is enabled.
Signed-off-by: Andrew Pinski
---
gcc/expmed.cc | 23 +++
1 file changed, 15 insertions(+), 8 deletions(-)
diff --git a/gcc/expmed.cc b/gcc/expmed.cc
index 72dbafe5d9f..d5da199d033 100644
--- a/gcc/expmed.cc
+++ b/gcc/expmed.cc
@@ -6408,18 +6408,25
.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/torture/pr120369-1.c | 9 +
gcc/tree-complex.cc | 4
2 files changed, 13 insertions(+)
create mode 100644 gcc/testsuite/gcc.dg/torture/pr120369-1.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr120369-1.c
b/gcc
On Sun, May 18, 2025 at 11:19 PM haochen.jiang
wrote:
>
> On Linux/x86_64,
>
> 064cac730f88dc71c6da578f9ae5b8e092ab6cd4 is the first bad commit
> commit 064cac730f88dc71c6da578f9ae5b8e092ab6cd4
> Author: Jan Hubicka
> Date: Sun May 4 10:52:35 2025 +0200
>
> Improve maybe_hot handling in inl
d higher.
>
> Is this something you may want to add to the release notes?
It is there already:
The first scheduling pass (-fschedule-insns) is no longer enabled by
default at -O2 for AArch64 targets. The pass is still enabled by
default at -O3 and -Ofast.
Thanks,
Andrew Pinski
>
> Gerald
.
* gcc.c-torture/execute/builtins/pr22237-1-lib.c: New test.
* gcc.c-torture/execute/builtins/pr22237-1.c: New test.
* gcc.dg/tree-ssa/pr57361.c: Disable forwprop1.
* gcc.dg/tree-ssa/pr57361-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/g++.dg/opt
331
* gimple-match-exports.cc (maybe_undo_push): New function.
(gimple_simplify): Call maybe_undo_push if resimplify was successfull.
Signed-off-by: Andrew Pinski
---
gcc/gimple-match-exports.cc | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --gi
match-exports.o-warn): Remove.
* gimple-match-exports.cc (gimple_extract): Remove valueize_condition
argument.
(gimple_extract_op): Update call to gimple_extract.
(gimple_simplify): Likewise. Also remove valueize_condition lambda.
Signed-off-by: Andrew Pinski
---
Make
non-static.
* gimple-fold.h (mark_lhs_in_seq_for_dce): Declare.
* tree-ssa-phiopt.cc (match_simplify_replacement): Use
mark_lhs_in_seq_for_dce instead of manually looping.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 2 +-
gcc/gimple-fold.h
l non-trivial changes, functionality improvements, etc. should go
through the upstream tree first and then be merged back to the GCC
tree.
Thanks,
Andrew Pinski
>
> Thanks,
> Archit
ust C if this is a
> concern?).
Maybe then the gimplifier is not the right place to do this then.
-Wshadow is handled in warn_if_shadowing inside c-decl.cc which is
called from pushdecl.
Maybe you could do something inside there where you search the current
statement list (cur_stmt_list) for previou
On Fri, May 16, 2025 at 9:49 AM Andrew Pinski wrote:
>
> On Fri, May 16, 2025 at 9:32 AM Icen Zeyada wrote:
> >
> > Merge simple_comparison patterns under a single vec_cond_expr for bit_and
> > and bit_ior in the simplify pass.
> >
> > Ensure that when both
be unused?
Other than that it might make sense to extend `(a?0:-1) lop (b?0:-1)` too.
I am not sure but xor might show up; though I don't think it is as
important as &/| as you handle today.
Thanks,
Andrew
> +
> (for cnd (cond vec_cond)
> /* (a != b) ? (a - b) : 0 -> (a - b) */
> (simplify
> --
> 2.43.0
>
1 - 100 of 2206 matches
Mail list logo