(emit_store_flag): If expanding (GE X 0) will need two insns, don't use subtarget...
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 19 Mar 1996 01:04:00 +0000 (20:04 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 19 Mar 1996 01:04:00 +0000 (20:04 -0500)
(emit_store_flag): If expanding (GE X 0) will need two
insns, don't use subtarget for the result of the first insn.
Move a likely constant to the start of a condition.

From-SVN: r11562

gcc/expmed.c

index dbd7eb2bb4f9da3776214b8c135cfe04c581295c..ec392e7aa7396b16928952cdfb1476ec9b9d8d3c 100644 (file)
@@ -3955,9 +3955,11 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
        subtarget = 0;
 
       if (code == GE)
-       op0 = expand_unop (mode, one_cmpl_optab, op0, subtarget, 0);
+       op0 = expand_unop (mode, one_cmpl_optab, op0,
+                          ((STORE_FLAG_VALUE == 1 || normalizep)
+                           ? 0 : subtarget), 0);
 
-      if (normalizep || STORE_FLAG_VALUE == 1)
+      if (STORE_FLAG_VALUE == 1 || normalizep)
        /* If we are supposed to produce a 0/1 value, we want to do
           a logical shift from the sign bit to the low-order bit; for
           a -1/0 value, we do an arithmetic shift.  */