OSDN Git Service

* config/i386/i386.c (const_int_1_operand): Simplify an
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2003 14:44:56 +0000 (14:44 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 22 Aug 2003 14:44:56 +0000 (14:44 +0000)
integer comparison.

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

gcc/ChangeLog
gcc/config/i386/i386.c

index 69ec5fd..754d54a 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-22  Kazu Hirata  <kazu@cs.umass.edu>
+
+       * config/i386/i386.c (const_int_1_operand): Simplify an
+       integer comparison.
+
 2003-08-22  Alan Modra  <amodra@bigpond.net.au>
 
        * config/fp-bit.c: Specify config/ dir for include of fp-bit.h.
index 3cba33a..aa6433a 100644 (file)
@@ -3343,7 +3343,7 @@ x86_64_zext_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 int
 const_int_1_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
 {
-  return (GET_CODE (op) == CONST_INT && INTVAL (op) == 1);
+  return op == const1_rtx;
 }
 
 /* Return nonzero if OP is CONST_INT >= 1 and <= 31 (a valid operand