Warren Buffett's Berkshire Hathaway bought more Apple shares before their latest jump to all-time highs.

Berkshire also cut its stake in by 32 percent, or 17.06 million shares, in the third quarter, according to a required quarterly filing with the U.S. Securities and Exchange Commission released Tuesday. The stock is the third-worst performer in the Dow Jones industrial average this year, down 10.3 percent.

Buffett's conglomerate increased its holdings of the iPhone maker's stock by 3.9 million to 134.1 million, the filing showed.