mmx.md (*vec_extract* splitters): Simplify post-reload splitter preparation statements.
authorUros Bizjak <ubizjak@gmail.com>
Wed, 8 May 2013 18:05:41 +0000 (20:05 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Wed, 8 May 2013 18:05:41 +0000 (20:05 +0200)
* config/i386/mmx.md (*vec_extract* splitters): Simplify post-reload
splitter preparation statements.
* config/i386/sse.md (*vec_extract* splitters): Ditto.
(*avx_vperm_broadcast_<mode>): Use adjust_address instead of
adjust_address_nv.

From-SVN: r198718

gcc/ChangeLog
gcc/config/i386/mmx.md
gcc/config/i386/sse.md

index 28a7262..b629517 100644 (file)
@@ -1,3 +1,11 @@
+2013-05-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/mmx.md (*vec_extract* splitters): Simplify post-reload
+       splitter preparation statements.
+       * config/i386/sse.md (*vec_extract* splitters): Ditto.
+       (*avx_vperm_broadcast_<mode>): Use adjust_address instead of
+       adjust_address_nv.
+
 2013-05-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * gimple-ssa-strength-reduction.c (count_candidates): Change
index 4911cb2..ebf7bcd 100644 (file)
   "TARGET_MMX && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
   "#"
   "&& reload_completed"
-  [(const_int 0)]
+  [(set (match_dup 0) (match_dup 1))]
 {
-  rtx op1 = operands[1];
-  if (REG_P (op1))
-    op1 = gen_rtx_REG (SFmode, REGNO (op1));
+  if (REG_P (operands[1]))
+    operands[1] = gen_rtx_REG (SFmode, REGNO (operands[1]));
   else
-    op1 = gen_lowpart (SFmode, op1);
-  emit_move_insn (operands[0], op1);
-  DONE;
+    operands[1] = adjust_address (operands[1], SFmode, 0);
 })
 
 ;; Avoid combining registers from different units in a single alternative,
          (match_operand:V2SF 1 "memory_operand")
          (parallel [(const_int 1)])))]
   "TARGET_MMX && reload_completed"
-  [(const_int 0)]
-{
-  operands[1] = adjust_address (operands[1], SFmode, 4);
-  emit_move_insn (operands[0], operands[1]);
-  DONE;
-})
+  [(set (match_dup 0) (match_dup 1))]
+  "operands[1] = adjust_address (operands[1], SFmode, 4);")
 
 (define_expand "vec_extractv2sf"
   [(match_operand:SF 0 "register_operand")
   "TARGET_MMX && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
   "#"
   "&& reload_completed"
-  [(const_int 0)]
+  [(set (match_dup 0) (match_dup 1))]
 {
-  rtx op1 = operands[1];
-  if (REG_P (op1))
-    op1 = gen_rtx_REG (SImode, REGNO (op1));
+  if (REG_P (operands[1]))
+    operands[1] = gen_rtx_REG (SImode, REGNO (operands[1]));
   else
-    op1 = gen_lowpart (SImode, op1);
-  emit_move_insn (operands[0], op1);
-  DONE;
+    operands[1] = adjust_address (operands[1], SImode, 0);
 })
 
 ;; Avoid combining registers from different units in a single alternative,
          (match_operand:V2SI 1 "memory_operand")
          (parallel [(const_int 1)])))]
   "TARGET_MMX && reload_completed"
-  [(const_int 0)]
-{
-  operands[1] = adjust_address (operands[1], SImode, 4);
-  emit_move_insn (operands[0], operands[1]);
-  DONE;
-})
+  [(set (match_dup 0) (match_dup 1))]
+  "operands[1] = adjust_address (operands[1], SImode, 4);")
 
 (define_expand "vec_extractv2si"
   [(match_operand:SI 0 "register_operand")
index 5f1fb2c..9d77250 100644 (file)
          (match_dup 0)
          (const_int 1)))]
   "TARGET_SSE && reload_completed"
-  [(const_int 0)]
-{
-  emit_move_insn (adjust_address (operands[0], <ssescalarmode>mode, 0),
-                 operands[1]);
-  DONE;
-})
+  [(set (match_dup 0) (match_dup 1))]
+  "operands[0] = adjust_address (operands[0], <ssescalarmode>mode, 0);")
 
 (define_expand "vec_set<mode>"
   [(match_operand:V 0 "register_operand")
   "TARGET_SSE"
   "#"
   "&& reload_completed"
-  [(const_int 0)]
+  [(set (match_dup 0) (match_dup 1))]
 {
-  int i = INTVAL (operands[2]);
-
-  emit_move_insn (operands[0], adjust_address (operands[1], SFmode, i*4));
-  DONE;
+  operands[1] = adjust_address (operands[1], SFmode, INTVAL (operands[2]) * 4);
 })
 
 (define_expand "avx_vextractf128<mode>"
       DONE;
     }
 
-  operands[1] = adjust_address_nv (op1, <ssescalarmode>mode,
-                                  elt * GET_MODE_SIZE (<ssescalarmode>mode));
+  operands[1] = adjust_address (op1, <ssescalarmode>mode,
+                               elt * GET_MODE_SIZE (<ssescalarmode>mode));
 })
 
 (define_expand "avx_vpermil<mode>"