At the time, Diem was the arch-enemy of Vietnam's Communists. He was waging war against them, as the United States did both then and later. It is an outrageous distortion of history and logic to pretend that this action somehow defined the sides in the war.
Interestingly enough, there was a very similar distortion in one of Mel's movies, The Year of Living Dangerously. This portrayed the military campaign against Indonesia's Communists as being conducted on behalf of the corrupt leader Sukarno. The truth was almost the direct opposite; Sukarno had encouraged and supported the Communists and was in conflict with his own military over this policy. When the Reds attempted to seize complete power, the Army seized the opportunity to get rid of them, and got rid of Sukarno himself not long afterward.