Don't call ADJUST_INSN_LENGTH on an insn inside a sequence
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 27 Jun 1996 15:05:07 +0000 (15:05 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 27 Jun 1996 15:05:07 +0000 (15:05 +0000)
From-SVN: r12336

gcc/config/sh/sh.c

index d3f1e0f03ad354a51d4dcf5212142a5e438c1601..7e0d8cc8f96e8c86c5668522cefa28611fbec50e 100644 (file)
@@ -556,10 +556,16 @@ output_branch (logic, insn, operands)
   int adjusted_length;
 
   /* Undo the effects of ADJUST_INSN_LENGTH, so that we get the real
-     length.  */
-  adjusted_length = length;
-  ADJUST_INSN_LENGTH (insn, adjusted_length);
-  length -= (adjusted_length - length);
+     length.  If NEXT_INSN (PREV_INSN (insn)) != insn, then the insn
+     is inside a sequence, and ADJUST_INSN_LENGTH was not called on
+     it.  */
+  if (PREV_INSN (insn) == NULL
+      || NEXT_INSN (PREV_INSN (insn)) == insn)
+    {
+      adjusted_length = length;
+      ADJUST_INSN_LENGTH (insn, adjusted_length);
+      length -= (adjusted_length - length);
+    }
 
   switch (length)
     {