Walmart Inc. is expanding its use of robots in stores to help monitor inventory, clean floors and unload trucks, part of the retail giant’s efforts to control labor costs as it spends more to raise wages and offer new services like online grocery delivery.

The country’s largest private employer said at least 300 stores this year will add machines that scan shelves for out-of-stock products. Autonomous floor scrubbers will be deployed in 1,500 stores to help speed up cleaning, after a test in hundreds of stores last year. And the number of conveyor belts that automatically scan and sort products as they come off trucks will more than double, to 1,200.

The company said the addition of a single machine can cut a few hours a day of work previously done by a human, or allow Walmart to allocate fewer people to complete a task, a large saving when spread around 4,600 U.S. stores. Executives said they are focused on giving workers more time to do other tasks, and on hiring in growing areas like e-commerce.

Instead, Walmart is spending to battle Amazon.com Inc. and serve more shoppers buying online. Walmart has hired around 40,000 store workers to pick groceries from shelves to fulfill online orders. The company is also raising wages, adding worker training, and buying e-commerce startups.

Store workers spend two to three hours a day driving a floor scrubber through a store using the manual machines, said a company spokesman last year. The automatic conveyor belts cut the number of workers needed to unload trucks by half, from around eight to four workers, said executives at a company presentation last June.