OSDN Git Service

* m68k.md (zero_extend?i?i2 expander): Use gen_lowpart instead
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jul 2001 20:19:12 +0000 (20:19 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jul 2001 20:19:12 +0000 (20:19 +0000)
of doing the change by hand.

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

gcc/ChangeLog
gcc/config/m68k/m68k.md

index 8e1ab06..67572ed 100644 (file)
@@ -1,3 +1,9 @@
+Fri Jul 20 22:14:49 CEST 2001  Roman Zippel  <zippel@linux-m68k.org>
+                              Jan Hubicka  <jh@suse.cz>
+
+       * m68k.md (zero_extend?i?i2 expander): Use gen_lowpart instead
+       of doing the change by hand.
+
 Fri Jul 20 21:59:42 CEST 2001  Jan Hubicka  <jh@suse.cz>
 
        * rtlanal.c (set_noop_p): Return true for noop jumps.
index 33473dd..f81138e 100644 (file)
   "
 {
   operands[1] = make_safe_from (operands[1], operands[0]);
-  if (GET_CODE (operands[0]) == SUBREG)
-    operands[2] = gen_rtx_SUBREG (HImode, SUBREG_REG (operands[0]),
-                                 SUBREG_BYTE (operands[0]));
-  else
-    operands[2] = gen_rtx_SUBREG (HImode, operands[0], 0);
+  operands[2] = gen_lowpart (HImode, operands[0]);
 }")
 
 (define_expand "zero_extendqihi2"
   "
 {
   operands[1] = make_safe_from (operands[1], operands[0]);
-  if (GET_CODE (operands[0]) == SUBREG)
-    operands[2] = gen_rtx_SUBREG (QImode, SUBREG_REG (operands[0]),
-                                 SUBREG_BYTE (operands[0]));
-  else
-    operands[2] = gen_rtx_SUBREG (QImode, operands[0], 0);
+  operands[2] = gen_lowpart (QImode, operands[0]);
 }")
 
 (define_expand "zero_extendqisi2"
   "
 {
   operands[1] = make_safe_from (operands[1], operands[0]);
-  if (GET_CODE (operands[0]) == SUBREG)
-    operands[2] = gen_rtx_SUBREG (QImode, SUBREG_REG (operands[0]),
-                                 SUBREG_BYTE (operands[0]));
-  else
-    operands[2] = gen_rtx_SUBREG (QImode, operands[0], 0);
+  operands[2] = gen_lowpart (QImode, operands[0]);
 }")
 \f
 ;; Patterns to recognize zero-extend insns produced by the combiner.