OSDN Git Service

* config/rs6000/rs6000.c (num_insns_constant_wide): Change
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Apr 2006 17:58:55 +0000 (17:58 +0000)
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Apr 2006 17:58:55 +0000 (17:58 +0000)
satisfies_constraint_[IL] to explicit tests on value.

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

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 1b34bd3..6201129 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-04  David Edelsohn  <edelsohn@gnu.org>
+
+       * config/rs6000/rs6000.c (num_insns_constant_wide): Change
+       satisfies_constraint_[IL] to explicit tests on value.
+
 2006-04-04  Sebastian Pop  <pop@cri.ensmp.fr>
 
        * tree-scalar-evolution.c (compute_overall_effect_of_inner_loop,
index 9d303c0..63ee622 100644 (file)
@@ -2004,11 +2004,12 @@ int
 num_insns_constant_wide (HOST_WIDE_INT value)
 {
   /* signed constant loadable with {cal|addi} */
-  if (satisfies_constraint_I (GEN_INT (value)))
+  if ((unsigned HOST_WIDE_INT) (value + 0x8000) < 0x10000)
     return 1;
 
   /* constant loadable with {cau|addis} */
-  else if (satisfies_constraint_L (GEN_INT (value)))
+  else if ((value & 0xffff) == 0
+          && (value >> 31 == -1 || value >> 31 == 0))
     return 1;
 
 #if HOST_BITS_PER_WIDE_INT == 64