re PR target/65196 (avr_adjust_insn_length uses recog_memoized on invalid insn)
authorGeorg-Johann Lay <avr@gjlay.de>
Wed, 25 Feb 2015 12:26:41 +0000 (12:26 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Wed, 25 Feb 2015 12:26:41 +0000 (12:26 +0000)
PR target/65196
* config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
only with NONDEBUG_INSN_P.

From-SVN: r220964

gcc/ChangeLog
gcc/config/avr/avr.c

index 1a53114..e603411 100644 (file)
@@ -1,5 +1,11 @@
 2015-02-25  Georg-Johann Lay  <avr@gjlay.de>
 
+       PR target/65196
+       * config/avr/avr.c (avr_adjust_insn_length): Call recog_memoized
+       only with NONDEBUG_INSN_P.
+
+2015-02-25  Georg-Johann Lay  <avr@gjlay.de>
+
        Use variadic macros with avr-log.c.
 
        * config/avr/avr-protos.h (avr_vdump): New prototype.
index f69ba38..7d0a13d 100644 (file)
@@ -8610,7 +8610,8 @@ avr_adjust_insn_length (rtx_insn *insn, int len)
      It is easier to state this in an insn attribute "adjust_len" than
      to clutter up code here...  */
 
-  if (JUMP_TABLE_DATA_P (insn) || recog_memoized (insn) == -1)
+  if (!NONDEBUG_INSN_P (insn)
+      || -1 == recog_memoized (insn))
     {
       return len;
     }