+2016-04-20 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/70725
+ * tree-if-conv.c (is_false_predicate): New function.
+ (predicate_mem_writes): Use it.
+
2016-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/70726
+2016-04-20 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/70725
+ * gcc.dg/pr70725.c: New test.
+
2016-04-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/70726
--- /dev/null
+/* PR tree-optimization/70725 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-march=skylake-avx512" { target { i?86-*-* x86_64-*-* } } } */
+
+extern short a;
+extern int b, d;
+extern int c[100];
+extern int e;
+extern int f;
+
+void
+fn1 ()
+{
+ for (; e < 2; e = e + 1)
+ d = a;
+ for (;;)
+ for (int g = 0; g < 5; g = g + 1)
+ for (int h = 0; h < 2; h = h + 1)
+ for (int i = 0; i < 3; i = i + 1)
+ c[f + i] = a && b;
+}
return new_name;
}
+/* Return true when COND is a false predicate. */
+
+static inline bool
+is_false_predicate (tree cond)
+{
+ return (cond == NULL_TREE
+ || cond == boolean_false_node
+ || integer_zerop (cond));
+}
+
/* Return true when COND is a true predicate. */
static inline bool
gimple *stmt;
int index;
- if (is_true_predicate (cond))
+ if (is_true_predicate (cond) || is_false_predicate (cond))
continue;
swap = false;