rs6000: Fix UNORDERED without NaNs, for DFP (PR92573)
diff mbox series

Message ID 61ab33e4bcaa95a2cbbbec8e146390e9f89ac252.1574256632.git.segher@kernel.crashing.org
State New
Headers show
Series
  • rs6000: Fix UNORDERED without NaNs, for DFP (PR92573)
Related show

Commit Message

Segher Boessenkool Nov. 20, 2019, 1:35 p.m. UTC
This is the analogue of r278103, but for DFP.

Committing to trunk.


Segher


2019-11-20  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/92573
	* config/rs6000/dfp.md (dfptstsfi_<code>_<mode> for DFP_TEST and DDTD):
	Handle UNORDERED if !HONOR_NANS.

---
 gcc/config/rs6000/dfp.md | 6 ++++++
 1 file changed, 6 insertions(+)

Patch
diff mbox series

diff --git a/gcc/config/rs6000/dfp.md b/gcc/config/rs6000/dfp.md
index 659b3c9..687858c 100644
--- a/gcc/config/rs6000/dfp.md
+++ b/gcc/config/rs6000/dfp.md
@@ -289,6 +289,12 @@  (define_expand "dfptstsfi_<code>_<mode>"
   ]
   "TARGET_P9_MISC"
 {
+  if (<CODE> == UNORDERED && !HONOR_NANS (<MODE>mode))
+    {
+      emit_move_insn (operands[0], const0_rtx);
+      DONE;
+    }
+
   operands[3] = gen_reg_rtx (CCFPmode);
 })