--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-march=haswell" { target x86_64-*-* i?86-*-* } } */
+
+int crash_me(char* ptr, unsigned long size)
+{
+ short result[16] = {0};
+
+ unsigned long no_iters = 0;
+ for(unsigned long i = 0; i < size - 12; i+= 13){
+ for(unsigned long j = 0; j < 12; j++){
+ result[j] += ptr[i + j] - '0';
+ }
+ no_iters++;
+ }
+
+ int result_int = 0;
+ for(int j = 0; j < 12; j++){
+ int bit_value = result[j] > no_iters/2 ? 1 : 0;
+ result_int |= bit_value;
+ }
+
+ return result_int;
+}
fprintf (f, "\"%p\" -> \"%p\";", (void *)node, (void *)child);
for (slp_tree child : SLP_TREE_CHILDREN (node))
- dot_slp_tree (f, child, visited);
+ if (child)
+ dot_slp_tree (f, child, visited);
}
DEBUG_FUNCTION void
vinfo = next;
}
STMT_VINFO_DEF_TYPE (first_element) = vect_internal_def;
- /* It can be still vectorized as part of an SLP reduction. */
- loop_vinfo->reductions.safe_push (last);
+ /* It can be still vectorized as part of an SLP reduction.
+ ??? But only if we didn't skip a conversion around the group.
+ In that case we'd have to reverse engineer that conversion
+ stmt following the chain using reduc_idx and from the PHI
+ using reduc_def. */
+ if (STMT_VINFO_DEF_TYPE (last) == vect_reduction_def)
+ loop_vinfo->reductions.safe_push (last);
}
/* Find SLP sequences starting from groups of reductions. */