From ed086e7e0a9f56c0e6f20236fb3cf2c64c4b4b71 Mon Sep 17 00:00:00 2001 From: Segher Boessenkool Date: Thu, 12 Apr 2018 22:01:37 +0200 Subject: [PATCH] rs6000: Fix an ICE with -mno-direct-move (PR85291) PR target/85291 * config/rs6000/rs6000.md (fix_truncsi2): Use legacy code if asked to not generate direct moves. (fix_truncsi2_stfiwx): Similar. (fix_truncsi2_internal): Similar. From-SVN: r259354 --- gcc/ChangeLog | 8 ++++++++ gcc/config/rs6000/rs6000.md | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 08c25401bb2..b934cc17a1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2018-04-12 Segher Boessenkool + + PR target/85291 + * config/rs6000/rs6000.md (fix_truncsi2): Use legacy code if + asked to not generate direct moves. + (fix_truncsi2_stfiwx): Similar. + (fix_truncsi2_internal): Similar. + 2018-04-12 Jakub Jelinek PR debug/83157 diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index b07e5bd2653..931c8086e8c 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -5579,7 +5579,7 @@ (fix:SI (match_operand:SFDF 1 "gpc_reg_operand")))] "TARGET_HARD_FLOAT && " { - if (!TARGET_P8_VECTOR) + if (!(TARGET_P8_VECTOR && TARGET_DIRECT_MOVE)) { rtx src = force_reg (mode, operands[1]); @@ -5606,7 +5606,7 @@ "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && (mode != SFmode || TARGET_SINGLE_FLOAT) && TARGET_STFIWX && can_create_pseudo_p () - && !TARGET_P8_VECTOR" + && !(TARGET_P8_VECTOR && TARGET_DIRECT_MOVE)" "#" "" [(pc)] @@ -5647,7 +5647,8 @@ (fix:SI (match_operand:SFDF 1 "gpc_reg_operand" "d,"))) (clobber (match_operand:DI 2 "gpc_reg_operand" "=1,d")) (clobber (match_operand:DI 3 "offsettable_mem_operand" "=o,o"))] - "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT && !TARGET_P8_VECTOR" + "TARGET_HARD_FLOAT && TARGET_DOUBLE_FLOAT + && !(TARGET_P8_VECTOR && TARGET_DIRECT_MOVE)" "#" "" [(pc)] -- 2.30.2