From 62298aa56bebc07b254ae6a5b69c9585ae9f23d2 Mon Sep 17 00:00:00 2001 From: johanknol Date: Sat, 13 Oct 2001 10:08:54 +0000 Subject: [PATCH] fixed bug # 470722 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1393 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/SDCCcse.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/SDCCcse.c b/src/SDCCcse.c index e98b3724..f3c27a55 100644 --- a/src/SDCCcse.c +++ b/src/SDCCcse.c @@ -1513,6 +1513,13 @@ cseBBlock (eBBlock * ebb, int computeOnly, if (pdic && compareType (operandType (IC_RESULT (pdic)), operandType (IC_RESULT (ic))) != 1) pdic = NULL; + + // TODO: this must go, a weak fix for bug #467035 + if (pdic && (pdic->level > ic->level)) { + // pdic was inside an inner loop + pdic = NULL; + } + } /* if found then eliminate this and add to */ @@ -1523,11 +1530,6 @@ cseBBlock (eBBlock * ebb, int computeOnly, if (IS_ITEMP (IC_RESULT (ic))) { - if (pdic->level > ic->level) { - // pdic was inside an inner loop - continue; - } - /* replace in the remaining of this block */ replaceAllSymBySym (ic->next, IC_RESULT (ic), IC_RESULT (pdic), &ebb->ndompset); /* remove this iCode from inexpressions of all -- 2.47.2