op_mode = GET_MODE (op1);
/* We only supports following scalar comparisons that use just 1
- instruction: DI/SI/QI/HI/DF/SF/HF.
+ instruction: DI/SI/HI/QI/XF/DF/SF/HF.
Unordered/Ordered compare cannot be correctly identified by
ccmp so they are not supported. */
- if (!(op_mode == DImode || op_mode == SImode || op_mode == HImode
- || op_mode == QImode || op_mode == DFmode || op_mode == SFmode
- || op_mode == HFmode)
+ if (!(op_mode == DImode || op_mode == SImode
+ || op_mode == HImode || op_mode == QImode
+ || ((op_mode == XFmode || op_mode == DFmode || op_mode == SFmode)
+ && (TARGET_80387
+ || (SSE_FLOAT_MODE_P (op_mode) && TARGET_SSE_MATH)))
+ || (op_mode == HFmode && TARGET_AVX512FP16))
|| code == ORDERED
|| code == UNORDERED)
{
--- /dev/null
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -ffast-math -mapxf -mno-80387 -mfpmath=387" } */
+
+int foo (int a, double b) {
+ if (a || b)
+ return 1;
+ return 0;
+}