From 696095350b0301162911c181498ac0a286098c1b Mon Sep 17 00:00:00 2001 From: Enkovich Ilya Date: Fri, 25 Nov 2011 09:46:27 +0000 Subject: [PATCH] re PR target/51287 (252.eon compfail with -march=atom) PR target/51287 * i386.c (distance_non_agu_define): Fix insn attr check. From-SVN: r181713 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4cf7e1c531..94360219f12 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-11-24 Enkovich Ilya + + PR target/51287 + * i386.c (distance_non_agu_define): Fix insn attr check. + 2011-11-24 Andrew MacLeod * optab.c (maybe_emit_atomic_exchange): New. Try to emit an diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 409accc1633..1b871be8480 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -16273,7 +16273,6 @@ distance_non_agu_define_in_bb (unsigned int regno1, unsigned int regno2, basic_block bb = start ? BLOCK_FOR_INSN (start) : NULL; rtx prev = start; rtx next = NULL; - enum attr_type insn_type; *found = false; @@ -16286,8 +16285,8 @@ distance_non_agu_define_in_bb (unsigned int regno1, unsigned int regno2, distance = increase_distance (prev, next, distance); if (insn_defines_reg (regno1, regno2, prev)) { - insn_type = get_attr_type (prev); - if (insn_type != TYPE_LEA) + if (recog_memoized (prev) < 0 + || get_attr_type (prev) != TYPE_LEA) { *found = true; return distance;