Commit 266ef361 by Richard Biener Committed by Richard Biener

re PR tree-optimization/87785 (ICE in dr_misalignment, at tree-vectorizer.h:1245…

re PR tree-optimization/87785 (ICE in dr_misalignment, at tree-vectorizer.h:1245 on 454.calculix with -Ofast and -flto)

2018-10-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/87785
	* tree-vect-slp.c (vect_gather_slp_loads): Only gather
	internal defs.

	* gcc.dg/torture/20181029-1.c: New testcase.
	* gcc.dg/torture/20181029-2.c: Likewise.

From-SVN: r265596
parent bca81bd2
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87785
* tree-vect-slp.c (vect_gather_slp_loads): Only gather
internal defs.
2018-10-29 Olivier Hainque <hainque@adacore.com>
* VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87785
* gcc.dg/torture/20181029-1.c: New testcase.
* gcc.dg/torture/20181029-2.c: Likewise.
2018-10-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/87790
* gcc.dg/pr87790.c: New testcase.
......
/* { dg-do compile } */
typedef __SIZE_TYPE__ size_t;
typedef unsigned long UV;
typedef size_t STRLEN;
typedef struct sv SV;
typedef struct magic MAGIC;
typedef struct xpv XPV;
typedef unsigned char U8;
typedef int I32;
typedef unsigned int U32;
struct sv {
void* sv_any;
U32 sv_flags;
};
struct xpv {
char * xpv_pv;
STRLEN xpv_cur;
};
struct magic {
char* mg_ptr;
};
extern const unsigned char PL_utf8skip[];
char *Perl_sv_2pv_flags (STRLEN *);
void Perl_utf8n_to_uvuni (U8 *);
void Perl_sv_magic (SV *);
void Perl_sv_pos_b2u( register SV* sv, I32* offsetp, MAGIC *mg)
{
U8* s;
STRLEN len;
s = (U8*)(((sv)->sv_flags & (0x00040000)) == 0x00040000
? ((len = ((XPV*) (sv)->sv_any)->xpv_cur), ((XPV*) (sv)->sv_any)->xpv_pv)
: Perl_sv_2pv_flags(&len));
if ((I32)len < *offsetp)
;
else
{
STRLEN *cache = ((void *)0);
if (((sv)->sv_flags & (0x00002000|0x00004000|0x00008000))
&& !((sv)->sv_flags & 0x00800000))
{
if (mg && mg->mg_ptr)
{
cache = (STRLEN *) mg->mg_ptr;
STRLEN forw = *offsetp;
STRLEN backw = cache[1] - *offsetp;
if (!(forw < 2 * backw))
{
U8 *p = s + cache[1];
STRLEN ubackw = 0;
cache[1] -= backw;
while (backw--)
{
p--;
while ((((U8)*p) >= 0x80 && (((U8)*p) <= 0xbf)))
{
p--;
backw--;
}
ubackw++;
}
cache[0] -= ubackw;
*offsetp = cache[0];
cache[2] = 0;
cache[3] = 0;
return;
}
}
if (!(((UV)(*s)) < 0x80))
Perl_utf8n_to_uvuni(s);
}
if (!((sv)->sv_flags & 0x00800000))
{
if (!mg)
Perl_sv_magic(sv);
cache[0] = len;
cache[1] = *offsetp;
}
*offsetp = len;
}
}
/* { dg-do compile } */
int a, b;
unsigned long c;
unsigned long *d;
void e();
void f()
{
if (c)
{
if (a)
{
e();
d[0] = c;
d[1] = b;
}
b = c;
}
}
......@@ -1645,7 +1645,8 @@ vect_gather_slp_loads (slp_instance inst, slp_tree node,
if (SLP_TREE_CHILDREN (node).length () == 0)
{
stmt_vec_info stmt_info = SLP_TREE_SCALAR_STMTS (node)[0];
if (STMT_VINFO_GROUPED_ACCESS (stmt_info)
if (SLP_TREE_DEF_TYPE (node) == vect_internal_def
&& STMT_VINFO_GROUPED_ACCESS (stmt_info)
&& DR_IS_READ (STMT_VINFO_DATA_REF (stmt_info)))
SLP_INSTANCE_LOADS (inst).safe_push (node);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment