This cures an unrecognizable insn ICE by modifying a predicate of
extenddftf2_internal (the only place this predicate is used) to ensure
that rtl optimization passes do not substitute 0.0 for a register with
known 0.0 value, except when VSX is enabled.  ie. Don't undo the
necessary register move emitted by the extenddftf2_fprs expander.
Bootstrapped and regression tested powerpc64le-linux, powerpc64-linux
and powerpc-linux.  OK to apply? 

        PR target/65576
        PR target/65240
        * config/rs6000/predicates.md (zero_reg_mem_operand): Exclude
        0.0 constant unless TARGET_VSX.

Index: gcc/config/rs6000/predicates.md
===================================================================
--- gcc/config/rs6000/predicates.md     (revision 221805)
+++ gcc/config/rs6000/predicates.md     (working copy)
@@ -964,7 +964,8 @@
 
 ;; Return 1 if the operand is CONST_DOUBLE 0, register or memory operand.
 (define_predicate "zero_reg_mem_operand"
-  (ior (match_operand 0 "zero_fp_constant")
+  (ior (and (match_test "TARGET_VSX")
+           (match_operand 0 "zero_fp_constant"))
        (match_operand 0 "reg_or_mem_operand")))
 
 ;; Return 1 if the operand is a CONST_INT and it is the element for 64-bit

-- 
Alan Modra
Australia Development Lab, IBM

Reply via email to