Hi Jan,
These new checks are too strong for AutoFDO. For example, the edge
probabilities are not guaranteed to be initialized (see
afdo_calculate_branch_prob).
This currently breaks autoprofiledbootstrap build.
I suggest removing
cfun->cfg->full_profile = true;
from auto-profile.cc.
Eu
side is simply ignored when profiling there isn't
permitted/possible then I guess the patch is OK?
Can you confirm?
Thanks,
Richard.
> -Original Message-
> From: Gcc-patches
> On Behalf Of
> Eugene Rozenfeld via Gcc-patches
> Sent: Friday, June 30, 2023 2:44
I also set /proc/sys/kernel/perf_event_paranoid to 1 instead of the default 2.
-Original Message-
From: Gcc-patches On
Behalf Of Eugene Rozenfeld via Gcc-patches
Sent: Friday, June 30, 2023 2:44 PM
To: Sam James ; Richard Biener
Cc: gcc-patches@gcc.gnu.org
Subject: RE: [EXTERNAL] Re
llect both user and kernel events for autofdo
tests and autoprofiledbootstrap
[You don't often get email from s...@gentoo.org. Learn why this is important at
https://aka.ms/LearnAboutSenderIdentification ]
Richard Biener via Gcc-patches writes:
> On Fri, Jun 30, 2023 at 7:28 AM E
When we collect just user events for autofdo with lbr we get some events where
branch
sources are kernel addresses and branch targets are user addresses. Without
kernel MMAP
events create_gcov can't make sense of kernel addresses. Currently create_gcov
fails if
it can't map at least 95% of event
cc1, cc1plus, and lto built during STAGEautoprofile need to be built with
debug info since they are used to build target libs. -gtoggle was
turning off debug info for this stage.
create_gcov should be passed prev-gcc/cc1, prev-gcc/cc1plus, and prev-gcc/lto
instead of stage1-gcc/cc1, stage1-gcc/cc1
Ok for trunk. Thank you for updating this!
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Andi Kleen via Gcc-patches
Sent: Tuesday, May 30, 2023 4:08 AM
To: gcc-patches@gcc.gnu.org
Cc: Andi Kleen
Subject: [EXTERNAL] [PATCH] Update perf auto profile script
- Fix gen_autofdo_e
ilter out --enable-werror-always from
>> STAGEautofeedback_CONFIGURE_FLAGS?
>>
>> Richard.
>>
>> > Thanks,
>> >
>> > Eugene
>> >
>> > -Original Message-
>> > From: Richard Biener
>> > Sent: T
> To: Eugene Rozenfeld
> Cc: gcc-patches@gcc.gnu.org
> Subject: [EXTERNAL] Re: [PATCH] Fixes and workarounds for warnings
> during autoprofiledbootstrap build
>
> On Wed, May 10, 2023 at 3:38 AM Eugene Rozenfeld via Gcc-patches
> wrote:
> >
> > autoprofiledbootst
y, May 9, 2023 11:40 PM
To: Eugene Rozenfeld
Cc: gcc-patches@gcc.gnu.org
Subject: [EXTERNAL] Re: [PATCH] Fixes and workarounds for warnings during
autoprofiledbootstrap build
On Wed, May 10, 2023 at 3:38 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> autoprofiledbootstrap build produces n
> I cannot find a call to this debug function on trunk. How exactly did this
> trigger a warning?
Here is the command during autoprofiledbootstrap build that resulted in a
warning:
~/gcc1_objdir/gcc$ /home/erozen/gcc1_objdir/./prev-gcc/xg++
-B/home/erozen/gcc1_objdir/./prev-gcc/
-B/home/er
autoprofiledbootstrap build produces new warnings since inlining decisions
are different from other builds. This patch contains fixes and workarounds
for those warnings.
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
* config/i386/i386-expand.cc (expand_vec_perm_interleave2): Work around
nance after inlining in
AutoFDO
On Tue, May 9, 2023 at 12:27 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> Todo from early_inliner needs to be propagated so that
> cleanup_tree_cfg () is called if necessary.
>
> This bug was causing an assert in get_loop_body during ipa-sra
Todo from early_inliner needs to be propagated so that
cleanup_tree_cfg () is called if necessary.
This bug was causing an assert in get_loop_body during
ipa-sra in autoprofiledbootstrap build since loops weren't
fixed up and one of the loops had num_nodes set to 0.
Tested on x86_64-pc-linux-gnu.
Ping for https://gcc.gnu.org/pipermail/gcc-patches/2023-March/613974.html
Thanks,
Eugene
-Original Message-
From: Eugene Rozenfeld
Sent: Tuesday, March 14, 2023 2:21 PM
To: Jeff Law ; gcc-patches@gcc.gnu.org; Andi Kleen
Subject: RE: [EXTERNAL] Re: [PATCH] Fix autoprofiledbootstrap bui
Hi Jeff,
I revived profile_merger tool in http://github.com/google/autofdo and re-worked
the patch to merge profiles for compiling the libraries.
Please take a look at the attached patch.
Thanks,
Eugene
-Original Message-
From: Jeff Law
Sent: Tuesday, November 22, 2022 10:16 PM
To:
on't often get email from jeffreya...@gmail.com. Learn why this is
important at https://aka.ms/LearnAboutSenderIdentification ]
On 11/21/22 14:26, Eugene Rozenfeld via Gcc-patches wrote:
> The existing comparison was incorrect for non-PRECISE counts (e.g.,
> AFDO): we could end up with
Rozenfeld ; gcc-patches@gcc.gnu.org;
Andi Kleen
Subject: [EXTERNAL] Re: [PATCH] Fix autoprofiledbootstrap build
[You don't often get email from jeffreya...@gmail.com. Learn why this is
important at https://aka.ms/LearnAboutSenderIdentification ]
On 11/21/22 14:57, Eugene Rozenfeld vi
1. Fix gcov version
2. Don't attempt to create an autoprofile file for cc1 since cc1plus
(not cc1) is not invoked when building cc1
3. Fix documentation typo
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
* c/Make-lang.in: Don't attempt to create an autoprofile file for cc1
* cp/M
The existing comparison was incorrect for non-PRECISE counts
(e.g., AFDO): we could end up with a 0 base_count, which could
lead to asserts, e.g., in good_cloning_opportunity_p.
gcc/ChangeLog:
* ipa-cp.cc (ipcp_propagate_stage): Fix profile count comparison.
---
gcc/ipa-cp.cc | 2 +-
1 f
Support for DWARF5 was added to create_gcov in
https://github.com/google/autofdo so we no longer need
to force DWARF4 for AutoFDO tests.
Tested on x86_64-pc-linux-gnu.
gcc/testsuite/ChangeLog:
* lib/profopt.exp: Don't force DWARF4 for AutoFDO tests
---
gcc/testsuite/lib/profopt.exp | 2 +
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
* auto-profile.cc (get_combined_location): Include discriminator in the
returned combined location.
(read_function_instance): Read discriminators from profiles.
---
gcc/auto-profile.cc | 5 +++--
1 file changed, 3 insertions(+
Yes, I received that one. The root cause is the -gstatement-frontiers issue
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100733 . I submitted a workaround
patch for that (
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603673.html ) but it
hasn't been approved yet. Another workaround is
l
Subject: [EXTERNAL] Re: [PATCH] Don't print discriminators for -fcompare-debug.
On Sun, Oct 16, 2022 at 10:25 PM Eugene Rozenfeld via Gcc-patches
wrote:
>
> With -gstatement-frontiers we may end up with different IR coming from
> the front end with and without debug information t
That commit had a bug that was fixed in
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=80f414e6d73f9f1683f93d83ce63a6a482e54bee
Was that fix included in your GCC build?
From: Jiang, Haochen
Sent: Sunday, October 16, 2022 8:09 PM
To: gcc-patches@gcc.gnu.org; Eugene Rozenfeld ;
Jiang, Haochen ; g
With -gstatement-frontiers we may end up with different IR
coming from the front end with and without debug information turned on.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100733 for details.
That may result in differences in discriminator values and -fcompare-debug
failures.
This patch di
I sent a patch that fixes a bug introduced by this patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603203.html
What you are seeing could have been caused by the same bug since it involves an
uninitialized variable.
Eugene
On Oct 10, 2022, at 5:54 PM, David Edelsohn wrote:
Th
The bug was introduced in f30e9fd33e56a5a721346ea6140722e1b193db42.
A variable (cur_locus_e) was incorrectly declared inside a loop.
I also moved two other declarations (last and locus) down to make
the code more clear.
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
PR debug/107193
Thank you for the review Jason.
I fixed formatting and updated the commit description:
Call statements are possible split points of a basic block so they may end up
in different basic blocks by the time pass_ipa_auto_profile executes.
This change will also simplify c
This change is based on commit 1e6c4a7a8fb8e20545bb9f9032d3854f3f794c18
by Dehao Chen in vendors/google/heads/gcc-4_8.
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
* tree-cfg.cc (assign_discriminators): Set discriminators for call stmts
on the same line within the same basic bloc
This change is based on commit 9fa26998a63d4b22b637ed8702520819e408a694
by Dehao Chen in vendors/google/heads/gcc-4_8.
gcc/ChangeLog:
* dwarf2out.cc (add_call_src_coords_attributes): Emit discriminators
for inlined call sites.
---
gcc/dwarf2out.cc | 6 +-
1 file changed, 5 insertion
AutoFDO counts are not reliable and we are currently not
performing hot/cold splitting based on them. This change adjusts
several tree-prof tests not to check for hot/cold splitting
when run with AutoFDO.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-prof/cold_partition_label.c: Don't check for
The comparison was incorrect when the counts weren't PRECISE.
For example, crossmodule-indir-call-topn-1.c was failing
with AutoFDO: when count_sum is 0 with quality AFDO,
count_sum > profile_count::zero() evaluates to true. Taking that
branch then leads to an assert in the call to to_sreal().
Tes
m: Gcc-patches
> On Behalf Of
> Eugene Rozenfeld via Gcc-patches
> Sent: Thursday, September 01, 2022 1:49 PM
> To: Jason Merrill ; gcc-patches@gcc.gnu.org
> Cc: Andi Kleen ; Jan Hubicka
> Subject: RE: [EXTERNAL] Re: [PING][PATCH] Add instruction level discriminator
> support.
After
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=c17975d81aaed49ff759c20c68b31304a6953d58
the expected inlining in indir-call-prof-2.c test happens during afdo phase
instead of einline.
This patch adjusts the test accordingly.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-prof/indir-call-pr
] Add instruction level discriminator
support.
On 9/1/22 18:22, Eugene Rozenfeld wrote:
> Jason,
>
> I made another small change in addressing your feedback (attached).
>
> Thanks,
>
> Eugene
>
> -Original Message-
> From: Gcc-patches
> On Behalf Of
&
Jason,
I made another small change in addressing your feedback (attached).
Thanks,
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Eugene Rozenfeld via Gcc-patches
Sent: Thursday, September 01, 2022 1:49 PM
To: Jason Merrill ; gcc-patches@gcc.gnu.org
Cc: Andi Kleen ; Jan
June%2F596065.html&data=0
> 5%7C01%7Ceugene.rozenfeld%40microsoft.com%7C3e9ebe6dd5b14fe4471808da81
> 85dc68%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637964709325691951
> %7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6I
> k1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=K%2BMx6jelnED3n%2Be2dT
> DYAPOqZZ8Zls
The patch is approved.
Eugene
-Original Message-
From: Andi Kleen
Sent: Friday, August 05, 2022 11:29 PM
To: Eugene Rozenfeld ; Xi Ruoyao
; gcc-patches@gcc.gnu.org
Subject: Re: [EXTERNAL] [PATCH] contrib: modernize gen_autofdo_event.py
On 8/6/2022 1:07 AM, Eugene Rozenfeld wrote:
> T
The changes look good to me. Also adding Andi, the author of the script.
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Xi Ruoyao via Gcc-patches
Sent: Sunday, June 26, 2022 11:15 PM
To: gcc-patches@gcc.gnu.org
Subject: [EXTERNAL] [PATCH] contrib: modernize gen_autofdo_event.p
ChangeLog:
* MAINTAINERS: Add myself as AutoFDO maintainer.
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1a37f4419b9..02ced0c43aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -239,6 +239,7 @@ tree-ssaAndre
this patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596065.html
Thanks,
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Eugene Rozenfeld via Gcc-patches
Sent: Thursday, June 02, 2022 12:22 AM
To: gcc-patches@gcc.gnu.org; Andi Kleen ; Jan Hubicka
Subject: [EXT
ugene
-Original Message-
From: Gcc-patches On
Behalf Of Eugene Rozenfeld via Gcc-patches
Sent: Thursday, June 02, 2022 12:22 AM
To: gcc-patches@gcc.gnu.org; Andi Kleen ; Jan Hubicka
Subject: [EXTERNAL] [PATCH] Add instruction level discriminator support.
This is the first in a series of pa
reak;
-Original Message-
From: Andi Kleen
Sent: Sunday, June 12, 2022 4:53 PM
To: Eugene Rozenfeld via Gcc-patches
Cc: Jan Hubicka ; Eugene Rozenfeld
Subject: [EXTERNAL] Re: [PATCH] Add instruction level discriminator support.
Eugene Rozenfeld via Gcc-patches writes:
> {
> dif
Hello,
I'd like to ping this patch:
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/596065.html
Thanks,
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Eugene Rozenfeld via Gcc-patches
Sent: Thursday, June 02, 2022 12:22 AM
To: gcc-patches@gcc.gnu.org; Andi Kleen
This is the first in a series of patches to enable discriminator support
in AutoFDO.
This patch switches to tracking discriminators per statement/instruction
instead of per basic block. Tracking per basic block was problematic since
not all statements in a basic block needed a discriminator and, a
t;
> Cc: gcc-patches@gcc.gnu.org
> Subject: [EXTERNAL] Re: [PATCH] Guard against applying scale with 0
> denominator
>
> On Fri, May 6, 2022 at 10:32 PM Eugene Rozenfeld via Gcc-patches
> wrote:
> >
> > Calling count.apply_scale with a 0 denominator causes an assert.
es@gcc.gnu.org
Subject: [EXTERNAL] Re: [PATCH] Guard against applying scale with 0 denominator
On Fri, May 6, 2022 at 10:32 PM Eugene Rozenfeld via Gcc-patches
wrote:
>
> Calling count.apply_scale with a 0 denominator causes an assert.
> This change guards against that.
>
> Tested on x
Calling count.apply_scale with a 0 denominator causes an assert.
This change guards against that.
Tested on x86_64-pc-linux-gnu.
gcc/ChangeLog:
* tree-loop-vect-manip.cc (vect_do_peeling): Guard against applying
scale with 0 denominator.
---
gcc/tree-vect-loop-manip.cc | 9 +
1
AutoFDO tries to promote and inline all indirect calls that were promoted
and inlined in the original binary and that are still hot. In the included
test case, the promotion results in a direct call that is a recursive call.
inline_call and optimize_inline_calls can't handle recursive calls at this
Cc: gcc-patches@gcc.gnu.org
Subject: [EXTERNAL] Re: [PATCH] AutoFDO: don't set
param_early_inliner_max_iterations to 10.
On Sat, Jan 29, 2022 at 12:24 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> param_early_inliner_max_iterations specifies the maximum number of
> nested ind
param_early_inliner_max_iterations specifies the maximum number
of nested indirect inlining iterations performed by early inliner.
Normally, the default value is 1.
For AutoFDO this parameter was also used as the number of iteration for
its indirect call promotion loop and the default value was se
When a basic block A has been annotated with a count and it has only one
successor (or predecessor) B, we can propagate the A's count to B.
The algorithm without this change could leave B without an annotation if B had
other unannotated predecessors (or successors). For example, in the test case I
] Re: [PATCH] gcov-profile/71672 Fix indirect call inlining
with AutoFDO
On Fri, Jul 30, 2021 at 9:09 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> This patch has the following changes:
>
> 1. The main fix is in auto-profile.c: the histogram value for
>indirect calls was inc
This patch has the following changes:
1. The main fix is in auto-profile.c: the histogram value for
indirect calls was incorrectly set up. That is fixed now.
2. Several tests now have -fdump-ipa-afdo-optimized instead of -fdump-ipa-afdo
in dg-options so that the expected output can be found
gen_autofdo_event.py was stumbling on models with stepping so
I updated the script to handle this case similar to the code in
https://github.com/andikleen/pmu-tools/blob/c6a5f63aede19def8886d6a8b74d7a55c38ca947/event_download.py
The second change was to tolerate cases when the CPU supports PEBS bu
Thank you for updating the documentation Martin.
The following line can now be removed:
padding: | char:0 | char:0 char:0 | char:0 char:0 char:0
Eugene
-Original Message-
From: Gcc-patches On
Behalf Of Martin Liška
Sent: Thursday, June 17, 2021 2:40 AM
To: gcc-patches@gcc.gnu.
Thank you for your reply Martin!
AUTO_PROFILE_VERSION should also be changed. Then create_gcov can be updated to
support both the old format and the new format.
Eugene
-Original Message-
From: Martin Liška
Sent: Thursday, June 17, 2021 2:38 AM
To: Eugene Rozenfeld ; gcc-patches@gcc.gn
The commit from this patch
(https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=23eb66d1d46a34cb28c4acbdf8a1deb80a7c5a05)
changed the semantics of gcov_read_string and gcov_write_string. Before this
change the string storage was as described in gcov-io.h:
"Strings are
padded with 1 to 4 NUL bytes,
Trivial change, committed to trunk.
[PATCH 1/1] Fix a typo in an AutoFDO error string
gcc/ChangeLog:
* auto-profile.c (read_profile): fix a typo in an error string
---
gcc/auto-profile.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/auto-profile.c b/gcc/auto-pr
ChangeLog:
2021-03-12 Eugene Rozenfeld
* MAINTAINERS (Write After Approval): Add myself.
0001-MAINTAINERS-Add-myself-for-write-after-approval.patch
Description: 0001-MAINTAINERS-Add-myself-for-write-after-approval.patch
to x <= y - CST?
> >
> > That is an invalid transformation: e.g., consider x=3, y=4, CST=2.
> > Can you please clarify?
> >
> > Thanks,
> >
> > Eugene
> >
> > -Original Message-
> > From: Richard Biener
> > Sent: Thursday, Dec
he patch.
>
> Richard, can you please clarify your feedback?
Hmm, OK.
The patch is OK.
Thanks,
Richard.
> Thanks,
>
> Eugene
>
> -Original Message-
> From: Gcc-patches On Behalf Of
> Eugene Rozenfeld via Gcc-patches
> Sent: Tuesday, December 15, 2020 2:06
feedback?
Thanks,
Eugene
-Original Message-
From: Gcc-patches On Behalf Of Eugene
Rozenfeld via Gcc-patches
Sent: Tuesday, December 15, 2020 2:06 PM
To: Richard Biener
Cc: gcc-patches@gcc.gnu.org
Subject: [EXTERNAL] Re: Optimize combination of comparisons to dec+compare
Richard,
>
Re-sending my question and re-attaching the patch.
Richard, can you please clarify your feedback?
Thanks,
Eugene
-Original Message-
From: Gcc-patches On Behalf Of Eugene
Rozenfeld via Gcc-patches
Sent: Tuesday, December 15, 2020 2:06 PM
To: Richard Biener
Cc: gcc-patches@gcc.gnu.org
ozenfeld
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Optimize combination of comparisons to dec+compare
On Thu, Dec 10, 2020 at 1:52 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> This patch adds a pattern for optimizing x < y || x == XXX_MIN to x <=
> y-1 if y is an integer with
This patch adds a pattern for optimizing
x < y || x == XXX_MIN to x <= y-1
if y is an integer with TYPE_OVERFLOW_WRAPS.
This fixes pr96674.
Tested on x86_64-pc-linux-gnu.
For this function
bool f(unsigned a, unsigned b)
{
return (b == 0) | (a < b);
}
the code without the patch is
test
rg
Subject: Re: [PATCH] [tree-optimization] Optimize max/min pattern with
comparison
On 11/25/20 3:04 PM, Eugene Rozenfeld via Gcc-patches wrote:
> Make the following simplifications:
> X <= MAX(X, Y) -> true
> X > MAX(X, Y) -> false
> X >= MIN(X, Y) -> tr
Make the following simplifications:
X <= MAX(X, Y) -> true
X > MAX(X, Y) -> false
X >= MIN(X, Y) -> true
X < MIN(X, Y) -> false
This fixes PR96708.
Tested on x86_64-pc-linux-gnu.
bool f(int a, int b)
{
int tmp = (a < b) ? b : a;
return tmp >= a;
}
Code without th
Simplify
((b | c) & a) | b
to
(a & c) | b.
This fixes PR96679.
Tested on x86_64-pc-linux-gnu.
int f(int a, int b, int c)
{
return ((b | c) & a) | b;
}
Code without the patch:
or edx,esi
andedx,edi
moveax,edx
or eax,esi
ret
Code with the patch:
andedi,edx
moveax,edi
Thank you for installing my patch Jeff!
Yes, I intend to contribute regularly. I'm working on getting copyright
assignment/disclaimer paperwork approved by my employer. I'll apply for commit
privs after that.
Eugene
-Original Message-
From: Jeff Law
Sent: Wednesday, November 18, 2020
: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] [tree-optimization] Optimize two patterns with three xors.
On Thu, Nov 12, 2020 at 2:53 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c.
>
> int f(int a, int b, int c)
> {
>
Simplify (a ^ b) & ((b ^ c) ^ a) --> (a ^ b) & ~c.
int f(int a, int b, int c)
{
return (a ^ b) & ((b ^ c) ^ a);
}
Code without the patch:
moveax,edx
xoreax,esi
xoreax,edi
xoredi,esi
andeax,edi
ret
Code with the patch:
xoredi,esi
andn eax,edx,edi
ret
Simplify (a
This patch adds a pattern for folding
x >> x
to
0
as described in PR96701.
Without this patch the x86_64-pc-linux-gnu code generated for this function
int
foo (int i)
{
return i >> i;
}
is
mov ecx,edi
sar edi,cl
test edi,edi
setne al
ret
With the patch
This patch adds a pattern for folding
x >> x
to
0
as described in PR96701.
Without this patch the x86_64-pc-linux-gnu code generated for this function
int
foo (int i)
{
return i >> i;
}
is
movecx,edi
saredi,cl
test edi,edi
setne al
r
: gcc-patches@gcc.gnu.org
Subject: [EXTERNAL] Re: [PATCH] [tree-optimization] Fix for PR97223
On Sat, Oct 24, 2020 at 2:20 AM Eugene Rozenfeld via Gcc-patches
wrote:
>
> This patch adds a pattern for folding
> x < (short) ((unsigned short)x + const) to
> x
This patch adds a pattern for folding
x < (short) ((unsigned short)x + const)
to
x <= SHORT_MAX - const
(and similarly for other integral types) if const is not 0.
as described in PR97223.
For example, without this patch the x86_64-pc-linux code generated for this
functi
77 matches
Mail list logo