Remove unnecesary operations and calculations in loop body.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>