From: Andrew Pinski
This fixes fully where SVE types were being used without sve being enabled.
Instead of trying to fix it such that we error out during RTL time, it is
better to error out in front-ends. This expands verify_type_context to
have a context of auto storage decl which is used for b
From: Andrew Pinski
When I fixed PR 102622, I accidently left behind a TYPE_PRECISION
check which I had there for checking before hand. This check
is not needed as the code will handle it correctly anyways.
Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
PR tree-optimi
From: Andrew Pinski
The function aarch64_evpc_ins would reuse the target even though
it might be the same register as the two inputs.
Instead of checking to see if we can reuse the target, just use the
original input directly.
Committed as approved after bootstrapped and tested on
aarch64-linux-
From: Andrew Pinski
The problem here is aarch64_simd_dup use
the vw iterator rather than vwcore iterator. This causes
problems for the V4SF and V2DF modes. I changed both of
aarch64_simd_dup patterns to be consistent.
Committed as obvious after a bootstrap/test on aarch64-linux-gnu.
PR
From: Andrew Pinski
This folds Fold ((type)(a<0)) << SIGNBITOFA into ((type)a) & signbit inside
match.pd.
This was already handled in fold-cost by:
/* A < 0 ? : 0 is simply (A & ). */
I have not removed as we only simplify "a ? POW2 : 0" at the gimple level to "a
<< CST1"
and fold actually do
From: Andrew Pinski
While writing up some testcases, I noticed some newer testcases
just had "dg-do compile/run" on them with dg-options of either -O1
or -O2. Since it is always better to run them over all optimization
levels I put them in gcc.c-torture/compile or gcc.c-torture/execute.
Committe
From: Andrew Pinski
For this PR, we have:
if (d_5 < 0)
goto ; [INV]
else
goto ; [INV]
:
v_7 = c_4 | -128;
:
# v_1 = PHI
Which PHI-OPT will try to simplify
"(d_5 < 0) ? (c_4 | -128) : c_4" which is not handled currently.
This adds a few patterns which allows to try to see
From: Andrew Pinski
So while working on PR 103228 (and a few others), I noticed the testcase for PR
94785
was failing. The problem is that the nop_convert moved from being inside the
IOR to be
outside of it. I also noticed the patch for PR 103228 was not needed to
reproduce the
issue either.
T
From: Andrew Pinski
Currently we fold (type) X op CST into (type) (X op ((type-x) CST)) when the
conversion widens
but not when the conversion is a nop. For the same reason why we move the
widening conversion
(the possibility of removing an extra conversion), we should do the same if the
conve
From: Andrew Pinski
The Linux kernel started to fail compile when the jump threader was improved
(r12-2591-g2e96b5f14e4025691). This failure was due to the IPA splitting code
decided now to split off the basic block which contained two functions,
one of those functions included the error attribut
From: Andrew Pinski
The problem is r12-5300-gf98f373dd822b35c allows phiopt to recognize more basic
blocks
but missed one location where phiopt could move an assignment from the middle
block
to the non-middle one. This patch fixes that.
OK? Bootstrapped and tested on x86_64-linux-gnu with no
From: Andrew Pinski
So like many optimizations on the gimple level, sometimes it makes sense to do
the
optimization early or later. In this case, creating a cond expression early
causes
other optimizations to be missed. So just disable it until canonicalize_math_p
()
is false.
OK? Bootstrapp
From: Andrew Pinski
Instead of some of the more manual optimizations inside phi-opt,
it would be good idea to do a lot of the heavy lifting inside match
and simplify instead. In the process, this moves the three simple
A?CST1:CST2 (where CST1 or CST2 is zero) simplifications.
OK? Boostrapped and
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
From: Andrew Pinski
phi-opt-10.c and phi-opt-7.c both depend on currently that some ssa name
versions are one digit long which is not always correct. This fixes the
problem by detecting digits rather than just using '.'.
Committed as obvious after a bootstrap/test.
Thanks,
Andrew Pinski
gcc/te
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
From: Andrew Pinski
To simplify PHI-OPT and future improvements to it in most
(but not all) cases, using match-and-simplify simplifies how
much code is needed to be added.
This depends on the following two patches:
https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571033.html
https://gcc.gnu.or
From: Andrew Pinski
The problem here is we don't have an assignment type any more
for zero-length structs as they were removed during gimplifcation.
This adds a special case where the assignment var does not exist
and the return decl is zero-length.
OK? Tested on aarch64-linux-gnu with no regres
From: Andrew Pinski
Instead of only removing assignments of zero-sized types,
assignments of all empty types should be removed during gimplification.
This moves to use is_empty_type which will be used in other places too.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
Th
From: Andrew Pinski
The problem here is we don't have an assignment type any more
for empty structs as they were removed during gimplifcation.
This adds a special case where the assignment var does not exist
and the return decl is empty typed.
OK? Tested on aarch64-linux-gnu with no regressions.
From: Andrew Pinski
This is the first of series of patches to simplify phi-opt
to use match and simplify in many cases. This simplification
will more things to optimize.
This is what Richard requested in
https://gcc.gnu.org/pipermail/gcc-patches/2021-May/571197.html
and I think it is the right
From: Andrew Pinski
This improves match_simplify_replace in phi-opt to handle the
case where there is one cheap preparation statement in the
middle basic block similar to xor_replacement and others.
This allows to remove xor_replacement too.
OK? Bootstrapped and tested on x86_64-linux-gnu with
From: Andrew Pinski
This improves match_simplify_replace in phi-opt to handle the
case where there is one cheap (non-call) preparation statement in the
middle basic block similar to xor_replacement and others.
This allows to remove xor_replacement which it does too.
OK? Bootstrapped and tested
From: Andrew Pinski
This improves match_simplify_replace in phi-opt to handle the
case where there is one cheap (non-call) preparation statement in the
middle basic block similar to xor_replacement and others.
This allows to remove xor_replacement which it does too.
OK? Bootstrapped and tested
From: Andrew Pinski
The problem here is with offset (and pointer) types is we produce
a negative expression when this optimization hits.
It is easier to disable this optimization for all non-integeral types
instead of finding an integer type which is the same precission as the
type to do the nega
From: Andrew Pinski
While debugging PR 100925, I found that the gimple verifiers
don't reject NEGATE on pointer or offset type.
This patch adds the check on some unary and binary gimple which
should not have operated on pointer/offset types.
OK? Bootstrapped and tested on x86_64-linux-gnu with n
From: Andrew Pinski
This should have been done before I started to work on connecting
PHI-OPT to match-and-simplify to see quickly if we miss anything
but it is better late than never.
Anyways there was no statistics counting in PHI-OPT before so adding
it is the right thing to do.
OK? Bootstrap
From: Andrew Pinski
Looks like I tested the change for bb-slp-pr97709.c on an
older tree which did not have the error message so I had
missed one more place where the change was needed.
Anyways committed after testing to make sure the testcase passes
now.
gcc/testsuite/ChangeLog:
* gcc
From: Andrew Pinski
So it turns out this is kinda of a latent bug but not really latent.
In GCC 9 and 10, phi-opt would transform a?-1:0 (even for signed 1-bit integer)
to -(type)a but the type is an one bit integer which means the negation is
undefined. GCC 11 fixed the problem by checking for a
From: Andrew Pinski
So here is the GCC 10 branch version which fixes the wrong code.
The problem is we create a negation of an one bit signed integer type
which is undefined if the value was -1.
This is not needed for GCC 11 branch since the case is handled differently
there and has been fixed th
From: Andrew Pinski
This patch series fixes PR tree-opt/102703 by
improving the code which will delete write only stores to also
delete the phi node (if it was a phi node) that was used to define
the write.
We need to some factoring out of the code to make it easier
to understand and less indenti
From: Andrew Pinski
While debugging PR 102703, I found it was hard to figure out where
the store was being removed as there was no pass which was outputting
why the store was removed.
This adds to execute_fixup_cfg the output.
Also note most of removals happen when execute_fixup_cfg is called
fro
From: Andrew Pinski
The comment about execute_fixup_cfg not being able to
run as a standalone pass is not true for a long time
now. It has been a standalone pass for a while now.
gcc/ChangeLog:
* tree-cfg.c (execute_fixup_cfg): Remove comment
about standalone pass.
---
gcc/tre
From: Andrew Pinski
To make it easier to fix PR 102703, factoring this code out
to its own function makes it easier to read and less indentions
too.
gcc/ChangeLog:
* tree-cfg.c (maybe_remove_writeonly_store): New function
factored out from ...
(execute_fixup_cfg): Here.
From: Andrew Pinski
Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense
to try to remove the defining statement for the store that is being removed.
Right now we only handle PHI node statements as there needs no extra checks
except for it is only used once in the store stat
From: Andrew Pinski
Instead of putting a full blow DCE after execute_fixup_cfg, it makes sense
to try to remove the defining statement for the store that is being removed.
Using simple_dce_from_worklist makes this easier, just mark the ssa_name on
the rhs side of the store (if it was one) in a bi
From: Andrew Pinski
Just like PR 100382, here we have a DCE removing a
null pointer load which is needed still.
In this case, execute_fixup_cfg removes a store (correctly)
and then removes the null load (incorrectly) due to
not checking stmt_unremovable_because_of_non_call_eh_p.
This patch adds t
From: Andrew Pinski
So the problem here is that arm_md_asm_adjust would
just create a set directly to the output memory which is wrong.
It needs to output to a temp register first and then do a
move.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
I have no way to test on a
From: Andrew Pinski
The problem here is tree-ssa-forwprop.c likes to produce
&MEM [(void *)_4 + 152B] which is the same as
_4 p+ 152 which the rest of GCC likes better.
This implements this transformation back to pointer plus to
improve better code generation later on.
OK? Bootstrapped and test
From: Andrew Pinski
The problem here is tree-ssa-forwprop.c likes to produce
&MEM [(void *)_4 + 152B] which is the same as
_4 p+ 152 which the rest of GCC likes better.
This implements this transformation back to pointer plus to
improve better code generation later on.
OK? Bootstrapped and test
From: Andrew Pinski
Since match and simplify does not have all of the inverted
comparison patterns, it make sense to just have
phi-opt try to do the inversion and try match and simplify again.
OK? Bootstrapped and tested on x86_64-linux-gnu.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* tree
From: Andrew Pinski
HONOR_SIGNED_ZEROS, HONOR_SIGN_DEPENDENT_ROUNDING, and HONOR_SNANS all
have an overload for taking a tree type now, so we should do that instead.
OK? Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
PR middle-end/101237
* fold-const.c (negate_exp
From: Andrew Pinski
So the problem here is that replace_phi_edge_with_variable
will copy range information to a already (not newly) defined
ssa name. This causes wrong code later on.
This patch fixes the problem by requiring there to be statements
that are to be placed before the conditional to
From: Andrew Pinski
To move a few things more to match-and-simplify from phiopt,
we need to allow match_simplify_replacement to run in early
phiopt. To do this we add a replacement for gimple_simplify
that is explictly for phiopt.
OK? Bootstrapped and tested on x86_64-linux-gnu with no
regressio
From: Andrew Pinski
To improve phiopt and be able to remove abs_replacement, this ports
most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to
match.pd. There is a few extra changes that are needed to remove
the "A CMP 0 ? A : -A" part from fold_cond_expr_with_comparison:
* Need to
From: Andrew Pinski
So the problem here is that replace_phi_edge_with_variable
will copy range information to a already (not newly) defined
ssa name. This causes wrong code later on.
This fixes the problem by require the new ssa name to
be defined in the same bb as the conditional that is
about
From: Andrew Pinski
Just two misc improvements to simplify and match of phiopt.
I decided to submit this two before I finish up the min/max
movement to match.pd as that will take some time.
Both showed up while looking into the movement of min/max
though.
Andrew Pinski (2):
Improve early simpl
From: Andrew Pinski
Instead of waiting for DCE to remove the unused statement,
and maybe optimize another conditional, it is better if
we don't move the statement and have the statement
removed.
gcc/ChangeLog:
* tree-ssa-phiopt.c (used_in_seq): New function.
(match_simplify_repl
From: Andrew Pinski
Previously the idea was gimple_simplify_phiopt would call
resimplify with a NULL sequence but that sometimes fails
even if there was only one statement produced. The cases
where it fails is when there are two simplifications happen.
In the case of the min/max production, the f
From: Andrew Pinski
Instead of waiting for DCE to remove the unused statement,
and maybe optimize another conditional, it is better if
we don't move the statement and have the statement
removed.
OK? Bootstrapped and tested on x86_64-linux-gnu.
Changes from v1:
* v2: Change the order of insertat
From: Andrew Pinski
This patch moves the (a-b) CMP 0 ? (a-b) : (b-a) optimization
from fold_cond_expr_with_comparison to match.
OK? Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* match.pd ((A-B) CMP 0 ? (A-B) : (B - A)):
New patterns.
gcc/testsuite/ChangeLog:
From: Andrew Pinski
Every base 10 digit will take use ~3.32 bits to represent. So for
a 64bit signed integer, it is 20 characters. The buffer was only
20 so it did not fit; add in the null character and "-O" part,
the buffer would be 3 bytes too small.
Instead of just increasing the size of the
From: Andrew Pinski
The problem is the buffer is too small to hold "-O" and
the interger. This fixes the problem by use the correct size
instead.
Changes since v1:
* v2: Use HOST_BITS_PER_LONG and just divide by 3 instead of
3.32.
OK? Bootstrapped and tested on x86_64-linux with no regressions
From: Andrew Pinski
So the problem is even though there was a csneg with
a zero_extend in the front, there was not one for csinv.
This fixes it by extending that pattern.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
gcc/ChangeLog:
PR target/101205
* con
From: Andrew Pinski
So the problem is even though there was a csneg with
a zero_extend in the front, there was not one for csinv.
This fixes it by extending that pattern.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
gcc/ChangeLog:
PR target/101205
* con
From: Andrew Pinski
The problem here is we try to an initialized value
from a scalar constant. For vectors we need to do
a vect_dup instead. This fixes that issue and we
get the correct code even and it does not crash.
OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions.
gcc/C
From: Andrew Pinski
The problem here is we try to an initialized value
from a scalar constant. For vectors we need to do
a vect_dup instead. This fixes that issue by using
build_{one,zero}_cst instead of integer_{one,zero}_node
when calling create_tailcall_accumulator.
Changes from v1:
* v2: Us
From: Andrew Pinski
The problem here is the x86_64 back-end uses a signed integer
for alignment and then divides by BITS_PER_UNIT so if we had
INT_MIN (which is what 1<<28*8 is), we would get the wrong result.
This fixes the problem by using unsigned for the argument to
x86_output_aligned_bss an
From: Andrew Pinski
So I was looking at some older PRs (PR 16016 in this case),
I noticed that some of the testcases were removed when
the tree-ssa branch was merged. This adds them back in.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Thanks,
Andrew Pinski
gcc/testsuit
From: Andrew Pinski
Just like the old bug PR9651, unsigned_fix rtl should
also be handled as a trapping instruction.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
PR rtl-optimization/101683
* rtlanal.c (may_trap_p_1): Handle UNSIGNED_FIX.
-
From: Andrew Pinski
While rewriting part of PHI-OPT to use match-and-simplify,
I ran into a bug where this pattern in match.pd would hit
and would produce invalid gimple; a shift of a pointer type.
This just disables this simplification for pointer types similarly
to what is already done in PHI-
From: Andrew Pinski
Instead of some of the more manual optimizations inside phi-opt,
it would be good idea to do a lot of the heavy lifting inside match
and simplify instead. In the process, this moves the three simple
A?CST1:CST2 (where CST1 or CST2 is zero) simplifications.
OK? Boostrapped and
From: Andrew Pinski
This patch uses the toplevel configure parts for GMP/MPFR for
gdb. The only thing is that gdb now requires MPFR for building.
Before it was a recommended but not required library.
Also this allows building of GMP and MPFR with the toplevel
directory just like how it is done fo
From: Andrew Pinski
SLOW_SHORT_ACCESS is defined in bfin and i386 target
headers but the target macro is not used elsewhere.
So let's remove it from those two headers and posion it.
OK? Built x86_64-linux-gnu and bfin-elf.
gcc/ChangeLog:
* config/bfin/bfin.h (SLOW_SHORT_ACCESS): Delete
From: Andrew Pinski
This patch uses the toplevel configure parts for GMP/MPFR for
gdb. The only thing is that gdb now requires MPFR for building.
Before it was a recommended but not required library.
Also this allows building of GMP and MPFR with the toplevel
directory just like how it is done fo
From: Andrew Pinski
I noticed this during the conversion of the docs
to sphinx that some options in the option index had a -
in the front of it for the texinfo docs. When the sphinx
conversion was reverted, I thought I would fix the texinfo
documentation for these options.
Committed as obvious a
From: Andrew Pinski
I noticed that the opindex for -m80387
option was wrong. It was just 80387 which
was not consistent with the rest of the options.
This fixes that and uses "@opindex m80387".
Committed as obvious after "make html" and checking
the option index page.
gcc/ChangeLog:
*
From: Andrew Pinski
For mcall-aixdesc, the opindex was just m which was wrong.
For mcall-openbsd, the opindex was mcall-netbsd which was wrong.
This two have been broken since the options were added to the documentation
back in r0-92913-g244609a618b094 .
Committed as obvious after a "make html"
From: Andrew Pinski
MeP support was removed in r7-1614-g0609abdad81e26
but it looks like the documentation for the target
was missed.
Committed as obvious after doing "make html" to
make sure the documentation is fine.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* doc/extend.texi: Remove MeP
From: Andrew Pinski
PicoChip support was removed in r5-3431-g157e859ffe3b5d but the
documentation was missed it seems.
Committed as obvious after running "make html" to make sure the
building of the documentation still works.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* doc/extend.texi: Rem
From: Andrew Pinski
Score target support was removed in r5-3909-g3daa7bbf791203
but it looks like some of the documentation was missed.
This removes it.
Committed as obvious after a "make html".
Thanks,
Andrew
gcc/ChangeLog:
* doc/invoke.texi: Remove Score option section.
---
gcc/doc
From: Andrew Pinski
sbitmap is a simple bitmap and the memory allocated is not cleared
on creation; you have to clear it or set it to all ones before using
it. This is unlike bitmap which is a sparse bitmap and the entries are
cleared as created.
The code added in r13-4044-gdc95e1e9702f2f missed
From: Andrew Pinski
The problem here is after we created a call expression
in the C front-end, we replace the decl type with
an error mark node. We then end up calling
aggregate_value_p with the call expression
with the decl with the error mark as the type
and we ICE.
The fix is to check the fun
From: Andrew Pinski
The problem here is the gimplifier returns GS_ERROR but
in some cases we don't check that soon enough and try
to do other work which could crash.
So the fix in these two cases is to return GS_ERROR
early if the gimplify_* functions had return GS_ERROR.
OK? Bootstrapped and te
From: Andrew Pinski
I had missed this when wrote the patch which allowed the
gimple to be moved from inside the conditional as it. It
was also missed in the review. Anyways the range information
needs to be reset for the moved gimple as it was under a
conditional and the flow has changed to be
From: Andrew Pinski
Since match_simplify_replacement uses gimple_simplify, there is a new
ssa name created sometimes and then we go and replace the phi edge with
this new ssa name, the range information on the phi is lost.
I don't have a testcase right now where we lose the range information
thou
From: Andrew Pinski
Since match and simplify does not have all of the inverted
comparison patterns, it make sense to just have
phi-opt try to do the inversion and try match and simplify again.
OK? Bootstrapped and tested on x86_64-linux-gnu.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* tree
From: Andrew Pinski
To make things slightly easiler to convert fold_cond_expr_with_comparison
over to match.pd, expanding the arg0 argument into 3 different arguments
is done. Also this was simple because we don't use arg0 after grabbing
the code and the two operands.
Also since we do this, we do
From: Andrew Pinski
While converting some fold_cond_expr_with_comparison
to match, I found that I wanted to use "for cnd (cond vec_cond)"
but that was not causing the lowering of cond to happen.
What was happening was the lowering of the for loop
was happening after the lowering of the cond. So
s
From: Andrew Pinski
To move a few things more to match-and-simplify from phiopt,
we need to allow match_simplify_replacement to run in early
phiopt. To do this, we need to mark some match patterns
if they can be done in early phiopt or not.
OK? Bootstrapped and tested on x86_64-linux-gnu with n
From: Andrew Pinski
To improve phiopt and be able to remove abs_replacement, this ports
most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to
match.pd. There is a few extra changes that are needed to remove
the "A CMP 0 ? A : -A" part from fold_cond_expr_with_comparison:
* Need to
From: Andrew Pinski
To able to move PHI-OPT's abs_replacement to match.pd, a bunch
of support needed to be added to PHI-OPT.
This is a set of 7 patches which allows us to remove abs_replacement
and even does one set further and does a few extra transformations
that abs_replacement did not do (jus
From: Andrew Pinski
I had missed this when wrote the patch which allowed the
gimple to be moved from inside the conditional as it. It
was also missed in the review. Anyways the range information
needs to be reset for the moved gimple as it was under a
conditional and the flow has changed to be
From: Andrew Pinski
To make things slightly easiler to convert fold_cond_expr_with_comparison
over to match.pd, expanding the arg0 argument into 3 different arguments
is done. Also this was simple because we don't use arg0 after grabbing
the code and the two operands.
Also since we do this, we do
From: Andrew Pinski
Since match_simplify_replacement uses gimple_simplify, there is a new
ssa name created sometimes and then we go and replace the phi edge with
this new ssa name, the range information on the phi is lost.
Placing this in replace_phi_edge_with_variable is the best option instead
From: Andrew Pinski
Since match and simplify does not have all of the inverted
comparison patterns, it make sense to just have
phi-opt try to do the inversion and try match and simplify again.
OK? Bootstrapped and tested on x86_64-linux-gnu.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* tree
From: Andrew Pinski
To move a few things more to match-and-simplify from phiopt,
we need to allow match_simplify_replacement to run in early
phiopt. To do this we add a replacement for gimple_simplify
that is explictly for phiopt.
OK? Bootstrapped and tested on x86_64-linux-gnu with no
regressio
From: Andrew Pinski
While converting some fold_cond_expr_with_comparison
to match, I found that I wanted to use "for cnd (cond vec_cond)"
but that was not causing the lowering of cond to happen.
What was happening was the lowering of the for loop
was happening after the lowering of the cond. So
s
From: Andrew Pinski
To improve phiopt and be able to remove abs_replacement, this ports
most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to
match.pd. There is a few extra changes that are needed to remove
the "A CMP 0 ? A : -A" part from fold_cond_expr_with_comparison:
* Need to
From: Andrew Pinski
This fixes PR 101230 where I had messed up and forgot that
invert_tree_comparison can return ERROR_MARK if the comparsion
is not invertable (floating point types).
Committed as obvious after a bootstrap/test on x86_64-linux-gnu-gnu
gcc/ChangeLog:
PR middle-end/10123
From: Andrew Pinski
To able to move PHI-OPT's abs_replacement to match.pd, a bunch
of support needed to be added to PHI-OPT.
This is a set of 4 (unapproved) patches which allows us to remove
abs_replacement and even does one set further and does a few extra
transformations that abs_replacement di
From: Andrew Pinski
Since match_simplify_replacement uses gimple_simplify, there is a new
ssa name created sometimes and then we go and replace the phi edge with
this new ssa name, the range information on the phi is lost.
Placing this in replace_phi_edge_with_variable is the best option instead
From: Andrew Pinski
To move a few things more to match-and-simplify from phiopt,
we need to allow match_simplify_replacement to run in early
phiopt. To do this we add a replacement for gimple_simplify
that is explictly for phiopt.
OK? Bootstrapped and tested on x86_64-linux-gnu with no
regressio
From: Andrew Pinski
Since match and simplify does not have all of the inverted
comparison patterns, it make sense to just have
phi-opt try to do the inversion and try match and simplify again.
OK? Bootstrapped and tested on x86_64-linux-gnu.
Thanks,
Andrew Pinski
gcc/ChangeLog:
* tree
From: Andrew Pinski
To improve phiopt and be able to remove abs_replacement, this ports
most of "A CMP 0 ? A : -A" from fold_cond_expr_with_comparison to
match.pd. There is a few extra changes that are needed to remove
the "A CMP 0 ? A : -A" part from fold_cond_expr_with_comparison:
* Need to
From: Andrew Pinski
Since we use C++11 by default now, we can
use constexpr for some const decls in tree-core.h.
This patch does that and it allows for better optimizations
of GCC code with checking enabled and without LTO.
For an example generic-match.cc compiling is speed up due
to the less n
From: Andrew Pinski
This another one of these ICE after error issues with the
gimplifier and a fallout from r12-3278-g823685221de986af.
The problem here is gimplify_modify_expr does not
check if either from or to was an error operand.
This adds the check and fixes the ICE.
OK? Bootstrapped and t
From: Andrew Pinski
The following makes sure to fold (~a) == b to a ^ b for truth
values.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Thanks,
Andrew Pinski
PR 103356
gcc/ChangeLog:
* match.pd: ((~a) == b -> a ^ b): New pattern.
gcc/testsuite/ChangeL
From: Andrew Pinski
There was a small typo where Also was done
twice. The second also should have been
handled. This fixes that.
Committed as obvious after a build.
gcc/ChangeLog:
* match.pd ((A / (1 << B)) -> (A >> B).):
Fix comment.
---
gcc/match.pd | 2 +-
1 file changed, 1
From: Andrew Pinski
The problem here is the code which handles {"a"} is supposed
to handle the case where the is something after the string but
it only handles the case where there is another string so
we go down the other path and error out saying "excess elements
in struct initializer" even tho
101 - 200 of 209 matches
Mail list logo