* TSX rises 20.11 points, or 0.17 percent, to 12,157.29 * CP Rail adds 4 percent after job cuts * Primaris Retail gains more than 14 pct after buyout offer By John Tilak TORONTO, Dec 5 (Reuters) - Canada's main stock index nudged higher on Wednesday, as investors cheered a cost-cutting plan at Canadian Pacific Railway Ltd and energy stocks rose on optimism about Chinese growth, while gold miners fell. Canadian Pacific Railway gained 4.1 percent to C$96.82 after the country's second-biggest railroad said it plans to cut 4,500 jobs by 2016 as part of a drive by its new chief executive to slash costs. "This is what shareholders have been looking for. This is what they have been hoping - that CP will face the challenges that they have. The new CEO is making his mark," said Fred Ketchen, director of equity trading at ScotiaMcLeod. The Toronto Stock Exchange's S&P/TSX composite index closed up 20.11 points, or 0.17 percent, at 12,157.29. Energy stocks notched the broadest gains as hopes about China's economic growth were bolstered after Communist Party chief Xi Jinping said the country's leaders will maintain their fine-tuning of economic policies in 2013. Suncor Energy Inc gained 1.3 percent to C$32.68, and Canadian Natural Resources Ltd advanced 1.3 percent to C$27.78. "There are expectations of better global growth, driven by ongoing U.S. budget talks and speculation that the Chinese economy is turning around for the better," said Elvis Picardo, a strategist at Global Securities in Vancouver. "There is also some degree of takeover speculation. Many Canadian energy producers are trading at pretty attractive valuations. The M&A activity in the U.S. certainly points to the attractiveness of energy assets in North America," Picardo said. U.S. miner Freeport-McMoRan Copper & Gold Inc on Wednesday made a combined $9 billion move on Plains Exploration & Production Co and McMoRan Exploration Co to diversify into the U.S. energy sector. Also on Wednesday, Canada said its Dec. 10 deadline for ruling on a bid by China's CNOOC Ltd for Nexen Inc could be extended. Nexen shares dipped after the comments, but still closed up 0.4 percent at C$24.26. Investors have been eagerly awaiting a Canadian decision on whether to approve two takeovers of domestic energy companies by foreign state-owned enterprises. Gold miners had another tough day, accounting for seven of the eight heaviest drags on the index, as bullion fell to a one-month low and Goldman Sachs lowered its price forecast for the precious metal. Canada's gold mining sub-sector has fallen more than 16 percent so far this year. Goldcorp Inc shed 3.3 percent to C$36.61, Barrick Gold Corp fell 2.4 percent to C$33.12, and Eldorado Gold was down 4.5 percent at C$13.26. The index's materials sector, which includes mining stocks, lost 1.4 percent. In company news, shares of Primaris Retail REIT rose 14.6 percent to C$26.40 after a consortium led by Canada's KingSett Capital offered about C$2.6 billion ($2.6 billion) to acquire the Canadian shopping mall owner. Overall equity momentum may be muted as the year draws to a close. "I don't see a year-end bounce, if anything there is a year-end fall, a slight decline," said Vincent Delisle, an investment strategist at Scotiabank. "I'm not looking for a Santa Claus rally," he added, pointing to tortuous U.S. budget negotiations as the biggest overhang. Delisle said he sees the benchmark S&P/TSX index rising to 12,800 next year and recommended investors be overweight in the energy, materials and industrials sectors, and underweight in consumer discretionary, financial, telecom and utility stocks.