#define TARGET_VECTOR_LOADSTORE_ALIGNMENT_HINTS 0
#endif
+/* Evaluate to true if it is ok to emit a non-signaling vector
+ comparison. */
+#define TARGET_NONSIGNALING_VECTOR_COMPARE_OK \
+ (TARGET_VX && !TARGET_VXE && (flag_finite_math_only || !flag_trapping_math))
+
#ifdef HAVE_AS_MACHINE_MACHINEMODE
#define S390_USE_TARGET_ATTRIBUTE 1
#else
case GT:
case LTGT:
/* Signaling vector comparisons are supported only on z14+. */
- return TARGET_Z14;
+ return TARGET_VXE || TARGET_NONSIGNALING_VECTOR_COMPARE_OK;
default:
return true;
}
[(set (match_operand:<tointvec> 0 "register_operand" "=v")
(gt:<tointvec> (match_operand:VFT 1 "register_operand" "v")
(match_operand:VFT 2 "register_operand" "v")))]
- "TARGET_VX && !TARGET_VXE && flag_finite_math_only"
+ "TARGET_NONSIGNALING_VECTOR_COMPARE_OK"
"<vw>fch<sdx>b\t%v0,%v1,%v2"
[(set_attr "op_type" "VRR")])
[(set (match_operand:<tointvec> 0 "register_operand" "=v")
(ge:<tointvec> (match_operand:VFT 1 "register_operand" "v")
(match_operand:VFT 2 "register_operand" "v")))]
- "TARGET_VX && !TARGET_VXE && flag_finite_math_only"
+ "TARGET_NONSIGNALING_VECTOR_COMPARE_OK"
"<vw>fche<sdx>b\t%v0,%v1,%v2"
[(set_attr "op_type" "VRR")])
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -std=gnu99 -ffast-math -fno-finite-math-only -march=z13" } */
+
+int b, c, d;
+double *e;
+int f() {
+ double *a = a;
+ int g = d, f = c, h = b;
+ if (__builtin_expect(f, 0))
+ for (; g < h; g++)
+ e[g] = (int)(a[g] >= 0.0 ? g + 0.99999999 : a[g]);
+ return 0;
+}