I'm pretty sure they gave those guns to help Philippines fight the war on drugs, because drug lords are bad. It had nothing to do with communist insurgencies.PH is still fighting a Maoist insurgency that had been sponsored by China until the 70s.
In an interview Lee Kuan Yew gave as he recalled Deng Xiaoping's visit to Singapore in the same time period, Deng asked Lee how China and S'pore could be 'friends', Lee replied: "Lay off supporting these communist movements in SEA". Deng then went: "As you wish", and that was that.
When Duterte didn't have enough guns to fight the NPA and the US blocked the sale, it was China who provided the Filipino govnt thousands of rifles as a gesture of goodwill -
Of course, Philippines could have used some of the guns to fight communists, but given that the more pressing conflict is with the drug lords, China would assume that they would primarily use the guns there.
China needs to keep monitoring the situation. If the current Philippines government intend to stand on the right side of history once the chips are down, they should be pardoned for collaboration with the Americans, as they have reasonable economical excuses. Otherwise, China should prepare to swiftly denazify them and install a friendly socialist, or perhaps a maoist, government. Its not like there's a lack of groups that would be willing to take over.