i386.md (pushsf splitter): Pass curr_insn to find_constant_src.
authorUros Bizjak <ubizjak@gmail.com>
Fri, 17 Jul 2015 23:41:11 +0000 (01:41 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Fri, 17 Jul 2015 23:41:11 +0000 (01:41 +0200)
* config/i386/i386.md (pushsf splitter): Pass curr_insn to
find_constant_src.  FAIL if find_constant_src returns NULL_RTX.
(mem->fpreg splitters): Ditto.
(general_operand->nonimmediate_operand splitter): Use explicit modes.
Disable DFmode for TARGET_64BIT.

From-SVN: r225975

gcc/ChangeLog
gcc/config/i386/i386.md

index 6d583195ff7fe994189bd7b97d106726f4ddc2db..f0854ae15f04cc4e2c43c6f000f4251a2689e00a 100644 (file)
@@ -1,3 +1,11 @@
+2015-07-18  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md (pushsf splitter): Pass curr_insn to
+       find_constant_src.  FAIL if find_constant_src returns NULL_RTX.
+       (mem->fpreg splitters): Ditto.
+       (general_operand->nonimmediate_operand splitter): Use explicit modes.
+       Disable DFmode for TARGET_64BIT.
+
 2015-07-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/66906
index ea98a3651c621113d1ce5b2306dc3329b4e9327e..18d0503212964149dedf6d47819650f1da24e92b 100644 (file)
 (define_split
   [(set (match_operand:SF 0 "push_operand")
        (match_operand:SF 1 "memory_operand"))]
-  "reload_completed
-   && (operands[2] = find_constant_src (insn))"
-  [(set (match_dup 0) (match_dup 2))])
+  "reload_completed"
+  [(set (match_dup 0) (match_dup 2))]
+{
+  operands[2] = find_constant_src (curr_insn);
+
+  if (operands[2] == NULL_RTX)
+    FAIL;
+})
 
 (define_split
   [(set (match_operand 0 "push_operand")
               ]
               (const_string "TI")))])
 
+(define_split
+  [(set (match_operand:TF 0 "nonimmediate_operand")
+        (match_operand:TF 1 "general_operand"))]
+  "reload_completed
+   && !(ANY_FP_REG_P (operands[0]) || ANY_FP_REG_P (operands[1]))"
+  [(const_int 0)]
+  "ix86_split_long_move (operands); DONE;")
+
 ;; Possible store forwarding (partial memory) stall
 ;; in alternatives 4, 6, 7 and 8.
 (define_insn "*movxf_internal"
           ]
           (const_string "*")))])
    
+(define_split
+  [(set (match_operand:XF 0 "nonimmediate_operand")
+        (match_operand:XF 1 "general_operand"))]
+  "reload_completed
+   && !(ANY_FP_REG_P (operands[0]) || ANY_FP_REG_P (operands[1]))"
+  [(const_int 0)]
+  "ix86_split_long_move (operands); DONE;")
+
 ;; Possible store forwarding (partial memory) stall in alternatives 4, 6 and 7.
 (define_insn "*movdf_internal"
   [(set (match_operand:DF 0 "nonimmediate_operand"
           ]
           (const_string "*")))])
 
+(define_split
+  [(set (match_operand:DF 0 "nonimmediate_operand")
+        (match_operand:DF 1 "general_operand"))]
+  "!TARGET_64BIT && reload_completed
+   && !(ANY_FP_REG_P (operands[0]) || ANY_FP_REG_P (operands[1]))"
+  [(const_int 0)]
+  "ix86_split_long_move (operands); DONE;")
+
 (define_insn "*movsf_internal"
   [(set (match_operand:SF 0 "nonimmediate_operand"
          "=Yf*f,m   ,Yf*f,?r ,?m,v,v,v,m,?r,?Yi,!*y,!*y,!m,!r ,!*Ym,r  ,m")
    && (GET_MODE (operands[0]) == TFmode
        || GET_MODE (operands[0]) == XFmode
        || GET_MODE (operands[0]) == DFmode
-       || GET_MODE (operands[0]) == SFmode)
-   && (operands[2] = find_constant_src (insn))"
+       || GET_MODE (operands[0]) == SFmode)"
   [(set (match_dup 0) (match_dup 2))]
 {
-  rtx c = operands[2];
-  int r = REGNO (operands[0]);
+  operands[2] = find_constant_src (curr_insn);
 
-  if ((SSE_REGNO_P (r) && !standard_sse_constant_p (c))
-      || (STACK_REGNO_P (r) && standard_80387_constant_p (c) < 1))
+  if (operands[2] == NULL_RTX
+      || (SSE_REGNO_P (REGNO (operands[0]))
+         && !standard_sse_constant_p (operands[2]))
+      || (STACK_REGNO_P (REGNO (operands[0]))
+          && standard_80387_constant_p (operands[2]) < 1))
     FAIL;
 })
 
   "reload_completed
    && (GET_MODE (operands[0]) == TFmode
        || GET_MODE (operands[0]) == XFmode
-       || GET_MODE (operands[0]) == DFmode)
-   && (operands[2] = find_constant_src (insn))"
+       || GET_MODE (operands[0]) == DFmode)"
   [(set (match_dup 0) (match_dup 2))]
 {
-  rtx c = operands[2];
-  int r = REGNO (operands[0]);
+  operands[2] = find_constant_src (curr_insn);
 
-  if ((SSE_REGNO_P (r) && !standard_sse_constant_p (c))
-      || (STACK_REGNO_P (r) && standard_80387_constant_p (c) < 1))
+  if (operands[2] == NULL_RTX
+      || (SSE_REGNO_P (REGNO (operands[0]))
+         && !standard_sse_constant_p (operands[2]))
+      || (STACK_REGNO_P (REGNO (operands[0]))
+          && standard_80387_constant_p (operands[2]) < 1))
     FAIL;
 })
 
     operands[1] = CONST1_RTX (<MODE>mode);
 })
 
-(define_split
-  [(set (match_operand 0 "nonimmediate_operand")
-        (match_operand 1 "general_operand"))]
-  "reload_completed
-   && (GET_MODE (operands[0]) == TFmode
-       || GET_MODE (operands[0]) == XFmode
-       || GET_MODE (operands[0]) == DFmode)
-   && !(ANY_FP_REG_P (operands[0]) || ANY_FP_REG_P (operands[1]))"
-  [(const_int 0)]
-  "ix86_split_long_move (operands); DONE;")
-
 (define_insn "swapxf"
   [(set (match_operand:XF 0 "register_operand" "+f")
        (match_operand:XF 1 "register_operand" "+f"))