[v2,08/14] LoongArch: Disable SF/DF -> unsigned DI expand in loongarch32

Message ID 20230809115325.3716347-9-c@jia.je
State Unresolved
Headers
Series LoongArch: Add loongarch32 and ilp32 abi |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Jiajie Chen Aug. 9, 2023, 11:46 a.m. UTC
  The current SF/DF -> unsigned DI expand rules require iordi3 insn which
is not available in loongarch32.

gcc/ChangeLog:

	* config/loongarch/loongarch.md (fixuns_truncdfdi2): Add
	TARGET_64BIT to condition.
	(fixuns_truncsfdi2): Add TARGET_64BIT to condition.
---
 gcc/config/loongarch/loongarch.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md
index c611a8a822a..31bdf3388f6 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -1576,7 +1576,7 @@ 
 (define_expand "fixuns_truncdfdi2"
   [(set (match_operand:DI 0 "register_operand")
 	(unsigned_fix:DI (match_operand:DF 1 "register_operand")))]
-  "TARGET_DOUBLE_FLOAT"
+  "TARGET_DOUBLE_FLOAT && TARGET_64BIT"
 {
   rtx reg1 = gen_reg_rtx (DFmode);
   rtx reg2 = gen_reg_rtx (DFmode);
@@ -1658,7 +1658,7 @@ 
 (define_expand "fixuns_truncsfdi2"
   [(set (match_operand:DI 0 "register_operand")
 	(unsigned_fix:DI (match_operand:SF 1 "register_operand")))]
-  "TARGET_DOUBLE_FLOAT"
+  "TARGET_DOUBLE_FLOAT && TARGET_64BIT"
 {
   rtx reg1 = gen_reg_rtx (SFmode);
   rtx reg2 = gen_reg_rtx (SFmode);