* config/i386/i386.md (pushsf splitter): Pass curr_insn to
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 23:41:11 +0000 (23:41 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Jul 2015 23:41:11 +0000 (23:41 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@225975 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 6d58319..f0854ae 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 ea98a36..18d0503 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"))