+2016-03-21 Marc Glisse <marc.glisse@inria.fr>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/70317
+ * match.pd (cmp @0 @0): Pass @0 instead of TYPE_MODE (TREE_TYPE (@0))
+ to HONOR_NANS.
+
2016-03-21 Uros Bizjak <ubizjak@gmail.com>
PR target/70327
(simplify
(cmp @0 @0)
(if (! FLOAT_TYPE_P (TREE_TYPE (@0))
- || ! HONOR_NANS (TYPE_MODE (TREE_TYPE (@0))))
+ || ! HONOR_NANS (@0))
{ constant_boolean_node (true, type); }
(if (cmp != EQ_EXPR)
(eq @0 @0)))))
(cmp @0 @0)
(if (cmp != NE_EXPR
|| ! FLOAT_TYPE_P (TREE_TYPE (@0))
- || ! HONOR_NANS (TYPE_MODE (TREE_TYPE (@0))))
+ || ! HONOR_NANS (@0))
{ constant_boolean_node (false, type); })))
(for cmp (unle unge uneq)
(simplify
+2016-03-21 Marc Glisse <marc.glisse@inria.fr>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/70317
+ * gcc.dg/pr70317.c: New test.
+
2016-03-21 Uros Bizjak <ubizjak@gmail.com>
PR target/70327
--- /dev/null
+/* PR tree-optimization/70317 */
+/* { dg-do compile } */
+/* { dg-skip-if "No NaN support" { spu*-*-* vax*-*-* pdp11*-*-* } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+typedef double V __attribute__((vector_size (256)));
+typedef __typeof ((V) {} < (V) {}) T;
+T a, b;
+
+__attribute__((noinline, noclone, optimize ("finite-math-only"))) void
+foo (V *x)
+{
+ V z = *x;
+ a = z <= z;
+}
+
+/* { dg-final { scan-tree-dump "a\[^\n\r]*= . -1, -1," "optimized" } } */
+
+__attribute__((noinline, noclone, optimize ("no-finite-math-only"))) void
+bar (V *x)
+{
+ V z = *x;
+ b = z <= z;
+}
+
+/* { dg-final { scan-tree-dump-not "b\[^\n\r]*= . -1, -1," "optimized" } } */