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
On Thu, May 29, 2025 at 1:05 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); !ovf ? a : sum
> - min (a, add (a, b)) -> [sum, ovf] = addo (a, b); !
::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 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
On Fri, May 16, 2025 at 5:13 PM Matthew Sotoudeh
wrote:
>
> This is a small patch to address
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92386
>
> When a variable is used before being shadowed in the same scope, GCC
> outputs incorrect/misleading debug information. The Bugzilla report has
> a m
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
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 operands of a bit-and or bit-or are simple_comparison
> results, they reside within the same vec_cond_expr
On Fri, May 16, 2025 at 4:10 AM Kito Cheng wrote:
>
> I am surprised that such generic names are defined within the system
> header files, I inclined just rename that to major_version,
> minor_version, could you send a patch for that?
major and minor come from extracting the major/minor parts of
On Fri, May 16, 2025 at 3:13 AM Richard Biener
wrote:
>
> On Fri, May 9, 2025 at 5:00 AM Andrew Pinski wrote:
> >
> > This removes the ability to follow statements that can throw internally.
> > This was suggested in bug report as a way to solve the issue here.
> >
rnreg pass renaming a valid
> paradoxical subreg into an invalid one.
> gcc.c-torture/execute/20040709-1.c
> gcc.c-torture/execute/20040709-2.c
>
> PR target/119966
>
> gcc/ChangeLog:
>
> * emit-rtl.cc (validate_subreg): Validate inner
> and oute
-gnu.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (forward_propagate_into_comparison): Dump
when there is a change to the statement happened.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 8
1 file changed, 8 insertions(+)
diff --git a/gcc/tree-ssa-forwprop.cc b/gc
On Wed, May 14, 2025 at 7:39 PM Andrew Pinski wrote:
>
> This is the next step in removing forward_propagate_into_comparison
> and forward_propagate_into_gimple_cond; In the case of `((int)(a cmp b)) != 0`
> we want to do the transformation to `a cmp b` even if the cast is used twic
.
(`bool_val != false`, `bool_val == true`): Allow an optional
cast between the bool_val and the ne/eq.
Signed-off-by: Andrew Pinski
---
gcc/match.pd | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/match.pd b/gcc/match.pd
index 79485f9678a..ffb1695e6e6 100644
On Mon, May 12, 2025 at 3:53 AM Richard Biener
wrote:
>
> On Fri, May 9, 2025 at 10:12 PM Andrew Pinski wrote:
> >
> > On Mon, Apr 21, 2025 at 1:42 AM Richard Biener
> > wrote:
> > >
> > > On Thu, Apr 17, 2025 at 7:37 PM Andrew Pinski
> > >
is_gimple_invariant_address ones.
* match.pd (`a ptr+ b !=\== ADDR`, `ADDR !=/== ssa_name`):
Move the ADDR to the last operand. Update comment.
Signed-off-by: Andrew Pinski
---
gcc/fold-const.cc | 6 +++---
gcc/match.pd | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git
::execute): Try to optimize memcpy like assignment
from a previous memset.
gcc/testsuite/ChangeLog:
* gcc.dg/pr78408-1.c: Update scan to forwprop1 only.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 168 -
gcc/testsuite/gcc.dg/pr78408
As sugguested in
https://gcc.gnu.org/pipermail/gcc-patches/2025-April/681507.html,
this adds the aliasing walk limit.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (optimize_memcpy_to_memset): Add a limit on the
alias walk.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 4
_COND.
* tree-cfgcleanup.h (canonicalize_bool_cond): New declaration.
* tree-ssa-forwprop.cc (forward_propagate_into_gimple_cond):
Call canonicalize_bool_cond.
Signed-off-by: Andrew Pinski
---
gcc/tree-cfgcleanup.cc | 39 +++
gcc/tree-cfgclea
being a comparison.
Signed-off-by: Andrew Pinski
---
gcc/gimple.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 977ff1c923c..94d5a13fcb2 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -3716,6 +3716,7 @@ gimple_cond_code (const gimple *gs)
inline
ssert
that gimple_cond_code is always a comparison.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index fafc4d6b77a..bd407ef8a69 100644
--- a/gcc/tre
(replace_stmt_with_simplification): Check cfun before
accessing cfun.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 28c5069931d..b74fb8bb50c 100644
--- a/gcc
statement and
there was a local fold that happened.
gcc/ChangeLog:
* tree-ssa-forwprop.cc (pass_forwprop::execute): Use `|=` for
changed on the local folding.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 14 +++---
1 file changed, 7 insertions(+), 7 deletions
and marking of fixup statements to after the local optimizations.
Signed-off-by: Andrew Pinski
---
gcc/tree-ssa-forwprop.cc | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index bcdec1aadc3
ff-by: Andrew Pinski
---
gcc/testsuite/c-c++-common/pr118868-1.c | 9 +
gcc/tree-cfg.cc | 12 +++-
2 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/c-c++-common/pr118868-1.c
diff --git a/gcc/testsuite/c-c++-common/pr11886
On Sat, Jan 11, 2025 at 1:11 PM Jeff Law wrote:
>
>
>
> On 1/11/25 2:08 PM, Andrew Pinski (QUIC) wrote:
> >> -Original Message-
> >> From: Jeff Law
> >> Sent: Saturday, January 11, 2025 8:12 AM
> >> To: Andrew Pinski (QUIC) ; gcc-
> >
the end of a basic block.
(partition_stack_vars): Take a new argument, all_active. Return early if
all_active is true after the qsort.
(expand_used_vars): Update call to partition_stack_vars.
Signed-off-by: Andrew Pinski
---
gcc/cfgexpand.cc | 46
cache if the
use is already
has a cache.
Signed-off-by: Andrew Pinski
---
gcc/cfgexpand.cc | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gcc/cfgexpand.cc b/gcc/cfgexpand.cc
index 0e76d340d26..277ef659f30 100644
--- a/gcc/cfgexpand.cc
+++ b/gcc/cfgexpand.cc
and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* cfgexpand.cc (vars_ssa_cache::operator()): Reverse the order of the
going
through the update list.
Signed-off-by: Andrew Pinski
---
gcc/cfgexpand.cc | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc
On Mon, May 12, 2025 at 2:36 PM Richard Sandiford
wrote:
>
> Andrew Pinski writes:
> > cmov optab was added back in r0-24110-g1c0290eaac4094
> > (https://gcc.gnu.org/pipermail/gcc-patches/1999-September/018596.html)
> > but it was never used. movcc is used instead
On Mon, May 12, 2025 at 8:54 AM Andrew Pinski wrote:
>
> cmov optab was added back in r0-24110-g1c0290eaac4094
> (https://gcc.gnu.org/pipermail/gcc-patches/1999-September/018596.html)
> but it was never used. movcc is used instead and since
> r0-93453-gf90b7a5a7913cc (cond-
Since the cmov optab is not used and is being removed,
the `cmov6` patterns from the aarch64 backend can
also be removed.
gcc/ChangeLog:
* config/aarch64/aarch64.md (cmov6): Remove.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/aarch64.md | 32
1
/testsuite/ChangeLog:
* g++.dg/tree-ssa/pr119903-1.C: New test.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 26 ++
gcc/testsuite/g++.dg/tree-ssa/pr119903-1.C | 24
2 files changed, 50 insertions(+)
create mode 100644 gcc
On Mon, May 12, 2025 at 3:56 AM Richard Biener
wrote:
>
> On Sat, May 10, 2025 at 3:13 AM Andrew Pinski
> wrote:
> >
> > This move this canonicalization from forwprop
> > (forward_propagate_into_gimple_cond)
> > to gimple-fold.
> > This is a step in remo
On Mon, May 12, 2025 at 3:51 AM Richard Biener
wrote:
>
> On Sat, May 10, 2025 at 3:19 AM Andrew Pinski
> wrote:
> >
> > with -ftrapping-math -fnon-call-exceptions and:
> > ```
> > tmp = FP0 CMP FP1;
> >
> > if (tmp != 0) ...
> > ```
>
.
* optabs.def (cmov_optab): Remove.
* optabs.h (can_compare_purpose): Remove ccp_cmov.
Signed-off-by: Andrew Pinski
---
gcc/optabs.cc | 3 ---
gcc/optabs.def | 1 -
gcc/optabs.h | 3 +--
3 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/gcc/optabs.cc b/gcc/optabs.cc
index
mips pr54240 testcase
Like r9-5152-gd1409ea5a2f759 but for the mips testcase.
```
Thanks,
Andrew Pinski
>
> > gcc/testsuite/
> > * gcc.target/mips/pr54240.c: Scan phiopt2.
> >
> > Cherry-picked 02dd052d4822ca187af075f1fb5301c954844144
> > from htt
/torture/pr119131-1.c: Add -Wno-psabi.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/torture/pr119131-1.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/testsuite/gcc.dg/torture/pr119131-1.c
b/gcc/testsuite/gcc.dg/torture/pr119131-1.c
index c62f702f98c..1780035dade 100644
--- a/gcc
On Mon, May 5, 2025, 11:48 AM Cassio Neri wrote:
> Use a better algorithm to calculate n % 7, taking into account that the
> divisor
> is a Mersenne number. This is explained in this two-part lightning talk at
> CppCon 2024 [1, 2].
>
> Roughly speaking, the algorithm is used for n = sys_days but
(aarch64_cpu_data): Add cast to
unsigned
to VARIANT of the define AARCH64_CORE.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/driver-aarch64.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/config/aarch64/driver-aarch64.cc
b/gcc/config/aarch64/driver-aarch64.cc
index
igned.
Build and tested for aarch64-linux-gnu.
gcc/ChangeLog:
* config/aarch64/aarch64-protos.h (struct sve_vec_cost): Change
gather_load_x32_cost
and gather_load_x64_cost fields to unsigned.
Signed-off-by: Andrew Pinski
---
gcc/config/aarch64/aarch64-protos.h | 4 ++--
1 file ch
On Fri, May 9, 2025 at 6:27 AM Richard Biener
wrote:
>
> On Fri, May 9, 2025 at 1:34 PM Andrew Pinski wrote:
> >
> > On Fri, May 9, 2025 at 1:21 AM Richard Biener
> > wrote:
> > >
> > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski
> > > wrote
(replace_stmt_with_simplification): Reject for
noncall exceptions replacing comparison with itself.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 26 ++
1 file changed, 26 insertions(+)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 7b3a3d30045
): Canonicalize
`_Bool == 0` and `_Bool != 1` into `_Bool != 0` with swapping
the edges.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index
On Mon, Apr 21, 2025 at 1:42 AM Richard Biener
wrote:
>
> On Thu, Apr 17, 2025 at 7:37 PM Andrew Pinski
> wrote:
> >
> > So unlike constants, address invariants are currently put first if
> > used with a SSA NAME.
> > It would be better if address invaria
On Fri, May 9, 2025 at 12:47 PM Indu Bhagat wrote:
>
> Fix PR web/114649
I think this counts as obvious. And LGTM too.
> ---
> htdocs/readings.html | 4
> 1 file changed, 4 insertions(+)
>
> diff --git a/htdocs/readings.html b/htdocs/readings.html
> index 56398317..3b0556e6 100644
> --- a/
On Fri, May 9, 2025 at 4:34 AM Andrew Pinski wrote:
>
> On Fri, May 9, 2025 at 1:21 AM Richard Biener
> wrote:
> >
> > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski
> > wrote:
> > >
> > > These patterns are not needed any more. There were alrea
bool_name != 0` into `bool_name`
which will be used in the case of the non-call exceptions throwing comparisons.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* match.pd (`(ne (cmp) 0)`, `(eq (cmp) 1)`): Restrict to comparisons
that don't throw.
Signed-off-by: Andr
On Fri, May 9, 2025, 6:27 AM Richard Biener
wrote:
> On Fri, May 9, 2025 at 1:34 PM Andrew Pinski wrote:
> >
> > On Fri, May 9, 2025 at 1:21 AM Richard Biener
> > wrote:
> > >
> > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski
> wrote:
> > &g
On Fri, May 9, 2025 at 1:21 AM Richard Biener
wrote:
>
> On Fri, May 9, 2025 at 4:51 AM Andrew Pinski wrote:
> >
> > These patterns are not needed any more. There were already
> > 2 patterns which did `(ne bool_var 0)` into `bool_var` and
> > `(eq bool_var 1)` i
/ChangeLog:
* gimple-match-head.cc (get_def): Reject statements that can throw
internally.
gcc/testsuite/ChangeLog:
* g++.dg/tree-ssa/pr119903-1.C: New test.
Signed-off-by: Andrew Pinski
---
gcc/gimple-match-head.cc | 5 -
gcc/testsuite/g++.dg/tree
-pr102671-2.c: Increase
analyzer-max-svalue-depth.
Signed-off-by: Andrew Pinski
---
gcc/match.pd | 8
gcc/testsuite/gcc.dg/analyzer/null-deref-pr102671-2.c | 2 +-
gcc/testsuite/gcc.dg/tree-ssa/vrp24.c | 2 +-
3 files changed, 2
On Wed, Apr 23, 2025 at 2:03 AM Richard Biener
wrote:
>
> On Wed, Apr 23, 2025 at 5:59 AM Andrew Pinski
> wrote:
> >
> > To speed up things slightly so not needing to call all the way through
> > to match and simplify, we should return early for true/false on GIMPLE_C
ction.
(gimple_cond_false_canonical_p): New function.
* gimple-fold.cc (replace_stmt_with_simplification): Return
false if replacing the operands of GIMPLE_COND with an INTEGER_CST
and already in canonical form.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 15 +--
uite/ChangeLog:
* gcc.dg/tree-ssa/pr31261.c: Use `signed char` instead
of plain char.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/tree-ssa/pr31261.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c
b/gcc/testsuite/g
.
* tree-ssa-reassoc.cc: Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr120122-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc| 56 ++-
gcc/gimple-fold.h | 6 +--
gcc/testsuite/gcc.dg/torture
/phi-opt-41.c: Likewise.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-40.c | 7 +++---
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-41.c | 4 ++--
gcc/tree-ssa-phiopt.cc | 26 +++---
3 files changed, 9 insertions(+), 28 deletions(-)
diff
On Wed, May 7, 2025 at 4:10 AM Richard Biener
wrote:
>
> On Wed, May 7, 2025 at 3:55 AM Andrew Pinski wrote:
> >
> > Like the patch to phiopt (r15-4033-g1f619fe25925a5f7), this adds rewriting
> > of VCE to gimple_with_undefined_signed_overflow/rewrite_to_defined_over
t this interferes with the idea of having self-tests for
> the JSON parser.
>
> Maintaing the printer/parser routines and JSON schema:
> * Any change in the aarch64 tuning format will result in the need for
> manual changes to be made to the routines for
e-ssa-loop-split.cc (split_loop): Likewise.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 26 ++-
gcc/gimple-fold.h| 2 +-
gcc/tree-if-conv.cc | 16 +++
gcc/tree-scalar-evolution.cc | 5 +
gcc/tree-ssa-ifcombine.cc
/phi-opt-41.c: Likewise.
Signed-off-by: Andrew Pinski
---
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-40.c | 7 +++---
gcc/testsuite/gcc.dg/tree-ssa/phi-opt-41.c | 4 ++--
gcc/tree-ssa-phiopt.cc | 26 +++---
3 files changed, 9 insertions(+), 28 deletions(-)
diff
-ifcombine.cc: Likewise.
* tree-ssa-loop-im.cc: Likewise.
* tree-ssa-loop-split.cc: Likewise.
* tree-ssa-reassoc.cc: Likewise.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr120122-1.c: New test.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc
out of the max loops, take into account the always
executed
loop too.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-ssa-loop-im.cc (compute_invariantness): Hoist to the always
executed point
if ignorning the cost.
Signed-off-by: Andrew Pinski
---
gcc/tree
What does musttail check do? My patch doesn't remove sibcall.
> I don't see how it impacts musttail check.
I think Andi is confused. This pass converts a conditional branch that
has a bb that just does a tail call into a condition branch which does
the tail call.
E.g.
```
jne L1
...
L1:
jmp func1
```
into:
```
jne func1
...
```
So saving one jump. tailcalls are already expanded into jumps at the
point when this pass happens. It does NOT change a tail call into a
non-tail call nor a non-tail call into a tail call. So it has nothing
to do with musttail at all.
Thanks,
Andrew Pinski
>
> --
> H.J.
On Mon, May 5, 2025 at 12:53 PM Andrew Pinski wrote:
>
> On Mon, May 5, 2025 at 12:00 AM Richard Biener
> wrote:
> >
> > On Mon, May 5, 2025 at 3:45 AM Andrew Pinski
> > wrote:
> > >
> > > Like the patch to phiopt (r15-4033-g1f619fe25
On Sun, May 4, 2025 at 11:51 PM Richard Biener
wrote:
>
> On Mon, May 5, 2025 at 3:42 AM Andrew Pinski wrote:
> >
> > While fixing up how rewrite_to_defined_overflow works,
> > gcc.dg/Wrestrict-22.c started
> > to fail. This is because `d p+ 2` would moved by LIM
g the return value.
Bootstrapped and tested on x86_64-linux-gnu.
PR rtl-optimization/120090
gcc/ChangeLog:
* combine.cc (gen_lowpart_for_combine_no_emit): New function.
(RTL_HOOKS_GEN_LOWPART_NO_EMIT): Set to gen_lowpart_for_combine_no_emit.
Signed-off-by: Andrew P
On Mon, May 5, 2025 at 12:00 AM Richard Biener
wrote:
>
> On Mon, May 5, 2025 at 3:45 AM Andrew Pinski wrote:
> >
> > Like the patch to phiopt (r15-4033-g1f619fe25925a5f7), this adds rewriting
> > of VCE to gimple_with_undefined_signed_overflow/rewrite_to_defined_overflo
.
Signed-off-by: Andrew Pinski
---
gcc/gimple-fold.cc | 30 --
1 file changed, 28 insertions(+), 2 deletions(-)
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index c060ef81a42..a6a7fcbb8c1 100644
--- a/gcc/gimple-fold.cc
+++ b/gcc/gimple-fold.cc
@@ -10602,6
better not to override the cost
check
for conditional executed statements in the first place.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* tree-ssa-loop-im.cc (compute_invariantness): Don't ignore the cost for
conditional executed statements.
Signed-off-by: A
1 - 100 of 1468 matches
Mail list logo