if (IS_PTR (ltype))
{
isarray = left->isaddr;
- size = operandFromLit (getSize (ltype->next));
- right = geniCodeMultiply (right, size, (getArraySizePtr(left) >= INTSIZE));
+ // there is no need to multiply with 1
+ if (getSize(ltype->next)!=1) {
+ size = operandFromLit (getSize (ltype->next));
+ right = geniCodeMultiply (right, size, (getArraySizePtr(left) >= INTSIZE));
+ }
resType = copyLinkChain (ltype);
}
else
ic = newiCode (op, left, right);
IC_RESULT (ic) = newiTempOperand (newCharLink (), 1);
- /* if comparing anything greater than one byte
+ /* if comparing float
and not a '==' || '!=' || '&&' || '||' (these
will be inlined */
- if (getSize (ctype) > 1 &&
+ if (IS_FLOAT(ctype) &&
op != EQ_OP &&
op != NE_OP &&
op != AND_OP &&