diff mbox series

rs6000: Make lround<mode>di2 depend on TARGET_FPRND (PR86684)

Message ID dcfdb0931a00a0e86053ea2cd09d8d1246ada7c4.1535703603.git.segher@kernel.crashing.org
State New
Headers show
Series rs6000: Make lround<mode>di2 depend on TARGET_FPRND (PR86684) | expand

Commit Message

Segher Boessenkool Aug. 31, 2018, 8:43 a.m. UTC
TARGET_FPRND should be on for everything ISA 2.04 and later, and
TARGET_VSX implies ISA 2.06 or later; but it is possible to disable
TARGET_FPRND (separately via -mno-fprnd, but also implicitly)
currently, and then things fall down.  This patch makes things not
fall down.

Committing to trunk, and queued up for backports.


Segher


2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>

	PR target/86684
	PR target/87149
	* config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.

---
 gcc/config/rs6000/rs6000.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md
index 49e2090..c4ef878 100644
--- a/gcc/config/rs6000/rs6000.md
+++ b/gcc/config/rs6000/rs6000.md
@@ -5985,7 +5985,7 @@  (define_expand "lround<mode>di2"
    (set (match_operand:DI 0 "gpc_reg_operand")
 	(unspec:DI [(match_dup 2)]
 		   UNSPEC_FCTID))]
-  "TARGET_HARD_FLOAT && TARGET_VSX"
+  "TARGET_HARD_FLOAT && TARGET_VSX && TARGET_FPRND"
 {
   operands[2] = gen_reg_rtx (<MODE>mode);
 })