diff options
-rw-r--r-- | gcc/config/rs6000/rs6000.cc | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/pr114402.c | 16 |
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index e713a1e..d18e262 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -15283,7 +15283,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode) rtx op0 = XEXP (cmp, 0); rtx op1 = XEXP (cmp, 1); - if (!TARGET_FLOAT128_HW && FLOAT128_VECTOR_P (mode)) + if (!TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)) comp_mode = CCmode; else if (FLOAT_MODE_P (mode)) comp_mode = CCFPmode; @@ -15315,7 +15315,7 @@ rs6000_generate_compare (rtx cmp, machine_mode mode) /* IEEE 128-bit support in VSX registers when we do not have hardware support. */ - if (!TARGET_FLOAT128_HW && FLOAT128_VECTOR_P (mode)) + if (!TARGET_FLOAT128_HW && FLOAT128_IEEE_P (mode)) { rtx libfunc = NULL_RTX; bool check_nan = false; diff --git a/gcc/testsuite/gcc.target/powerpc/pr114402.c b/gcc/testsuite/gcc.target/powerpc/pr114402.c new file mode 100644 index 0000000..9323c5e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr114402.c @@ -0,0 +1,16 @@ +/* Explicitly disable VSX when VSX is on. */ +/* { dg-options "-mno-vsx" { target powerpc_vsx } } */ + +/* Verify there is no ICE. */ + +long double a; +long double b; + +int +foo () +{ + if (a > b) + return 0; + else + return 1; +} |