* src/pic/gen.h: added prototypes emitpComment, popGetAddr and
[fw/sdcc] / src / SDCCcse.c
index 4b524b0bf5fb1b82e0a148e3da5e11687f523563..83863baa234830078142284f6f23996615e10d52 100644 (file)
@@ -492,7 +492,7 @@ DEFSETFUNC (findPrevIc)
   /* if iCodes are not the same */
   /* see the operands maybe interchanged */
   if (ic->op == cdp->diCode->op &&
-      (ic->op == '+' || ic->op == '*') &&
+      IS_ASSOCIATIVE(ic) &&
       isOperandEqual (IC_LEFT (ic), IC_RIGHT (cdp->diCode)) &&
       isOperandEqual (IC_RIGHT (ic), IC_LEFT (cdp->diCode)))
     {