(emit_store_flag): Set mode after canonicalizing op0/op1 so op1 is constant.
authorDoug Evans <dje@gnu.org>
Mon, 12 Dec 1994 18:17:32 +0000 (18:17 +0000)
committerDoug Evans <dje@gnu.org>
Mon, 12 Dec 1994 18:17:32 +0000 (18:17 +0000)
From-SVN: r8646

gcc/expmed.c

index 92ac24c9ac75d1e013fd9715abd55ae317e2fac7..2b9a29bf978e5203422f57c7544568cf12f2f806 100644 (file)
@@ -3727,9 +3727,6 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
   rtx last = 0;
   rtx pattern, comparison;
 
-  if (mode == VOIDmode)
-    mode = GET_MODE (op0);
-
   /* If one operand is constant, make it the second one.  Only do this
      if the other operand is not constant as well.  */
 
@@ -3742,6 +3739,9 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
       code = swap_condition (code);
     }
 
+  if (mode == VOIDmode)
+    mode = GET_MODE (op0);
+
   /* For some comparisons with 1 and -1, we can convert this to 
      comparisons with zero.  This will often produce more opportunities for
      store-flag insns. */