From 9ddc16eb1afc918935594e87c2dda8367ab697f3 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sun, 29 Nov 2015 18:11:54 +0000 Subject: [PATCH] re PR target/28115 (possible bug in recog_memoized usage in rs6000.c??) PR target/28115 * config/rs6000/rs6000.c (rs6000_adjust_cost): Correct recog_memoized test for insn and check recog_memoized for dep_insn. From-SVN: r231045 --- gcc/ChangeLog | 6 ++++++ gcc/config/rs6000/rs6000.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdfda45e875..bcbebbc1257 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-29 David Edelsohn + + PR target/28115 + * config/rs6000/rs6000.c (rs6000_adjust_cost): Correct + recog_memoized test for insn and check recog_memoized for dep_insn. + 2015-11-28 Nathan Sidwell * config/nvptx/nvptx.h (FIRST_PARM_OFFSET): Add void cast. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index ba00b61377a..a38e70d2c33 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -28544,8 +28544,8 @@ rs6000_adjust_cost (rtx_insn *insn, rtx link, rtx_insn *dep_insn, int cost) { enum attr_type attr_type; - if (! recog_memoized (insn)) - return 0; + if (recog_memoized (insn) < 0 || recog_memoized (dep_insn) < 0) + return cost; switch (REG_NOTE_KIND (link)) {