This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix SLSR issue
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 6 Sep 2017 14:54:23 +0200 (CEST)
- Subject: Re: [PATCH] Fix SLSR issue
- Authentication-results: sourceware.org; auth=none
- References: <alpine.LSU.2.20.1709060946270.14191@zhemvz.fhfr.qr>
On Wed, 6 Sep 2017, Richard Biener wrote:
>
> This fixes a bogus check for a mode when the type matters. The
> test can get fooled by vector ops with integral mode and thus we
> later ICE trying to use wide-ints operating on vector constants.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Promptly overlooked some regressions, fixed as follows.
Richard.
2017-09-06 Richard Biener <rguenther@suse.de>
* gimple-ssa-strength-reduction.c
(find_candidates_dom_walker::before_dom_children): Also allow
pointer types.
Index: gcc/gimple-ssa-strength-reduction.c
===================================================================
--- gcc/gimple-ssa-strength-reduction.c (revision 251753)
+++ gcc/gimple-ssa-strength-reduction.c (working copy)
@@ -1742,7 +1742,8 @@ find_candidates_dom_walker::before_dom_c
slsr_process_ref (gs);
else if (is_gimple_assign (gs)
- && INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs))))
+ && (INTEGRAL_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs)))
+ || POINTER_TYPE_P (TREE_TYPE (gimple_assign_lhs (gs)))))
{
tree rhs1 = NULL_TREE, rhs2 = NULL_TREE;