optimized CGAbstractAtomicFun by removing unrequired operations in some special situations; replaced memset with a for loop in the generated code