re PR target/67004 (valgrind error in recog_memoized & shorten_branches)
authorUros Bizjak <ubizjak@gmail.com>
Sat, 25 Jul 2015 11:34:59 +0000 (13:34 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 25 Jul 2015 11:34:59 +0000 (13:34 +0200)
PR target/67004
* config/i386/i386.h (ADJUST_INSN_LENGTH): Use NONDEBUG_INSN_P (INSN)
predicate and INSN_CODE (INSN) >= 0 to check for valid instruction.

From-SVN: r226215

gcc/ChangeLog
gcc/config/i386/i386.h

index f91b006deaa4552b87880da0b5d43f04ce911292..b43e9002ff885cb8e953c9078e65108eb32ecac5 100644 (file)
@@ -1,3 +1,9 @@
+2015-07-25  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/67004
+       * config/i386/i386.h (ADJUST_INSN_LENGTH): Use NONDEBUG_INSN_P (INSN)
+       predicate and INSN_CODE (INSN) >= 0 to check for valid instruction.
+
 2015-07-25  Sebastian Pop  <s.pop@samsung.com>
 
        * Makefile.in: Remove use of TREEBROWSER.
index 72ec74d8b94c1c5e07f57f421a9a300e807fefdf..7bd23ecadef9ba347e3417f493d8928abc5da0ee 100644 (file)
@@ -2262,11 +2262,12 @@ do {                                                                    \
 #define DEFAULT_LARGE_SECTION_THRESHOLD 65536
 
 /* Adjust the length of the insn with the length of BND prefix.  */
-#define ADJUST_INSN_LENGTH(INSN, LENGTH)       \
-do {                                           \
-  if (recog_memoized (INSN) >= 0               \
-      && get_attr_maybe_prefix_bnd (INSN))     \
-    LENGTH += ix86_bnd_prefixed_insn_p (INSN); \
+
+#define ADJUST_INSN_LENGTH(INSN, LENGTH)               \
+do {                                                   \
+  if (NONDEBUG_INSN_P (INSN) && INSN_CODE (INSN) >= 0  \
+      && get_attr_maybe_prefix_bnd (INSN))             \
+    LENGTH += ix86_bnd_prefixed_insn_p (INSN);         \
 } while (0)
 \f
 /* Which processor to tune code generation for.  These must be in sync