Add hadSideEffects=0 to some instructions.