Am 02.11.23 um 12:50 schrieb Roger Sayle:
This patch optimizes a few special cases in avr.md's *insv.any_shift.
instruction. This template handles tests for a single bit, where the result
has only a (different) single bit set in the result. Usually (currently)
this always requires a three-in
This patch optimizes a few special cases in avr.md's *insv.any_shift.
instruction. This template handles tests for a single bit, where the result
has only a (different) single bit set in the result. Usually (currently)
this always requires a three-instruction sequence of a BST, a CLR and a BLD
(
On Wed, Sep 14, 2022 at 11:42 PM Marc Glisse via Gcc-patches
wrote:
>
> On Tue, 13 Sep 2022, Roger Sayle wrote:
>
> > This patch tweaks the match.pd transformation previously added to fold
> > (X< > (wrapping) types, to also allow signed integer types provided that they
> > don't trap and the over
On Tue, 13 Sep 2022, Roger Sayle wrote:
This patch tweaks the match.pd transformation previously added to fold
(X<
In https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html , I
read:
"Bitwise operators act on the representation of the value including both
the sign and value bits, w
On Tue, Sep 13, 2022 at 8:37 PM Roger Sayle wrote:
>
>
> This patch tweaks the match.pd transformation previously added to fold
> (X< (wrapping) types, to also allow signed integer types provided that they
> don't trap and the overflow needn't be preserved for sanitization.
> i.e. this should now
This patch tweaks the match.pd transformation previously added to fold
(X<
gcc/ChangeLog
* match.pd (op (lshift @0 @1) (lshift @2 @1)): Optimize the
expression (X
Hello.
I noticed the patch caused new Clang warnings:
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang/build/gcc/tree-ssa-phiopt.c:2586:10:
warning: comparison of different enumeration types in switch statement
('combined_fn' and 'built_in_function') [-Wenum-compare-switch]
/home/marx
On Sat, Jul 31, 2021 at 9:56 AM Roger Sayle wrote:
>
>
> Many thanks again to Jakub Jelinek for a speedy fix for PR 101642.
> Interestingly, that test case "bswap16(x) ? : x" also reveals a
> missed optimization opportunity. The resulting "x ? bswap(x) : 0"
> can be further simplified to just bsw
Many thanks again to Jakub Jelinek for a speedy fix for PR 101642.
Interestingly, that test case "bswap16(x) ? : x" also reveals a
missed optimization opportunity. The resulting "x ? bswap(x) : 0"
can be further simplified to just bswap(x).
Conveniently, tree-ssa-phiopt.c already recognizes/opti
On 5/23/2021 10:21 AM, Andrew Pinski via Gcc-patches wrote:
On Sun, May 23, 2021 at 6:14 AM Marc Glisse wrote:
On Sun, 23 May 2021, apinski--- via Gcc-patches wrote:
+(for cmp (ge lt)
+/* x < 0 ? ~y : y into (x >> (prec-1)) ^ y. */
+/* x >= 0 ? ~y : y into ~((x >> (prec-1)) ^ y). */
+ (sim
On Sun, May 23, 2021 at 5:49 AM Martin Liška wrote:
>
> Hello.
>
> Similarly to:
> https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571039.html
>
> I've just reverted the ChangeLog commit change. I'm planning update
> of the documentation.
Obviously is for the other patch which I pushed and not
On Sun, May 23, 2021 at 6:14 AM Marc Glisse wrote:
>
> On Sun, 23 May 2021, apinski--- via Gcc-patches wrote:
>
> > +(for cmp (ge lt)
> > +/* x < 0 ? ~y : y into (x >> (prec-1)) ^ y. */
> > +/* x >= 0 ? ~y : y into ~((x >> (prec-1)) ^ y). */
> > + (simplify
> > + (cond (cmp @0 integer_zerop) (bit
On Sun, 23 May 2021, apinski--- via Gcc-patches wrote:
+(for cmp (ge lt)
+/* x < 0 ? ~y : y into (x >> (prec-1)) ^ y. */
+/* x >= 0 ? ~y : y into ~((x >> (prec-1)) ^ y). */
+ (simplify
+ (cond (cmp @0 integer_zerop) (bit_not @1) @1)
+ (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
+&& !TYPE_UN
Hello.
Similarly to:
https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571039.html
I've just reverted the ChangeLog commit change. I'm planning update
of the documentation.
Cheers,
Martin
From: Andrew Pinski
This copies the optimization that is done in phiopt for
"x < 0 ? ~y : y to (x >> 31) ^ y" into match.pd. The code
for phiopt is kept around until phiopt uses match.pd (which
I am working towards).
Note the original testcase is now optimized early on and I added a
new testcase
On Tue, 26 Sep 2017, Jakub Jelinek wrote:
> Hi!
>
> Right now we handle x == 0 && y == 0 into (x | y) == 0
> and x == -1 && y == -1 into (x & y) == -1 optimizations just in
> match.pd, where it will handle the case where the && (or || if using !=)
> is actually & (or |) and they are next to each
Hi!
Right now we handle x == 0 && y == 0 into (x | y) == 0
and x == -1 && y == -1 into (x & y) == -1 optimizations just in
match.pd, where it will handle the case where the && (or || if using !=)
is actually & (or |) and they are next to each other.
It doesn't handle the case when we have such com
On September 22, 2017 6:59:48 PM GMT+02:00, Jakub Jelinek
wrote:
>Hi!
>
>While fixing libgcc2.c (__mulvDI3), I've noticed that while we
>optimize x == 0 && y == 0 into (x | y) == 0, we don't optimize
>analogical x == -1 && y == -1 into (x & y) == -1.
>
>The following patch does that, bootstrapped
Hi!
While fixing libgcc2.c (__mulvDI3), I've noticed that while we
optimize x == 0 && y == 0 into (x | y) == 0, we don't optimize
analogical x == -1 && y == -1 into (x & y) == -1.
The following patch does that, bootstrapped/regtested on x86_64-linux and
i686-linux, ok for trunk?
2017-09-22 Jaku
On Thu, 29 Dec 2016, Jakub Jelinek wrote:
> Hi!
>
> On Tue, Dec 20, 2016 at 09:45:03PM +0100, Jakub Jelinek wrote:
> > > Note that you can write (shift @0 SSA_NAME@1) in the pattern instead of a
> > > separate test.
> >
> > That is what I tried first, but there is some bug in genmatch.c that
> >
Hi!
On Tue, Dec 20, 2016 at 09:45:03PM +0100, Jakub Jelinek wrote:
> > Note that you can write (shift @0 SSA_NAME@1) in the pattern instead of a
> > separate test.
>
> That is what I tried first, but there is some bug in genmatch.c that
> prevents it. The:
> (for vec (VECTOR_CST CONSTRUCTOR)
>
On Tue, Dec 20, 2016 at 09:30:17PM +0100, Marc Glisse wrote:
> would it make sense to extend it to rotates later?
I wasn't 100% sure if rotates also require 0..prec-1 rotate counts, or
if they accept arbitrary ones.
> Note that you can write (shift @0 SSA_NAME@1) in the pattern instead of a
> sep
On Tue, 20 Dec 2016, Jakub Jelinek wrote:
If the shift count has enough known zero low bits (non-zero bits only
above the ceil_log2 (precision)), then the only valid shift count that
is not out of bounds is 0, so we can as well fold it into the first
argument of the shift. This resolves a regre
Hi!
If the shift count has enough known zero low bits (non-zero bits only
above the ceil_log2 (precision)), then the only valid shift count that
is not out of bounds is 0, so we can as well fold it into the first
argument of the shift. This resolves a regression introduced by partly
optimizing it
On 01/12/15 13:28, Jakub Jelinek wrote:
Hi!
This patch optimizes away TRUNC_MOD_EXPR by constant second argument
(if not 0 and not type's minimum) if the range of the first argument
is already known to be [-op1 + 1, op1 - 1] or its subset.
Bootstrapped/regtested on x86_64-linux and i686-linux,
Hi!
This patch optimizes away TRUNC_MOD_EXPR by constant second argument
(if not 0 and not type's minimum) if the range of the first argument
is already known to be [-op1 + 1, op1 - 1] or its subset.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2015-01-12 Jakub Jelinek
On Sat, Jun 04, 2011 at 08:19:57AM -0700, H.J. Lu wrote:
> I don't think this pattern is correct. See:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49281
Fixed thusly, committed as obvious:
2011-06-04 Jakub Jelinek
PR target/49281
* config/i386/i386.md (*lea_general_4): R
On Wed, Apr 20, 2011 at 9:09 AM, Jakub Jelinek wrote:
> Hi!
>
> This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y
> for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in
> that case, when the low bits are known to be all 0, is like plus).
>
> Bootstrapped/regtes
On Wed, Apr 20, 2011 at 10:27:36AM -0700, Richard Henderson wrote:
> On 04/20/2011 09:09 AM, Jakub Jelinek wrote:
> > Hi!
> >
> > This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y
> > for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in
> > that case, when the
On 04/20/2011 09:09 AM, Jakub Jelinek wrote:
> Hi!
>
> This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y
> for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in
> that case, when the low bits are known to be all 0, is like plus).
>
> Bootstrapped/regtested on x
Hi!
This splitter allows us to optimize (x {* {2,4,8},<< {1,2,3}}) {|,^} y
for constant integer y <= {1ULL,3ULL,7ULL} using lea{l,q} (| or ^ in
that case, when the low bits are known to be all 0, is like plus).
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
2011-04-20 Jaku
31 matches
Mail list logo