What's true in China is not necessarily true for Libya, Iran, Algeria, Somalia (under Siad Barre), Egypt (under Nasser), Indonesia (under Sukarno), or any number of regimes that combined Communism and islam into a single entity--not to mention the Communist-created and Communist-supported PLO.
Of course regnant Communism, especially in "non-western" countries, doesn't include the self-hatred it does in the "western" context. And I was specifically thinking of our decadent "western" Communists, not the ones that, having a country to run, dispense with the hippie nonsense they spouted to come to power.
On 24 November 1917, weeks after the October revolution, the Bolsheviks issued an appeal to ‘All the Muslim Workers of Russia and the East’.[4] Lenin declared;
Muslims of Russia all you whose mosques and prayer houses have been destroyed, whose beliefs and customs have been trampled upon by the tsars and oppressors of Russia: your beliefs and practices, your national and cultural institutions are forever free and inviolate. Know that your rights, like those of all the peoples of Russia, are under the mighty protection of the revolution.[5]
Actually, Nasser openly declared himself to be both nationalist and socialist. That is Nazism. Vast majority of other Islamic countries operate that way too, if not all of them; undoubtedly Iran is that way.
The internationalist atheistic communists will support any and all movements that are out to upset the established order, seeing themselves moving in and taking advantage of the chaos. Red China is currently doing that in most of southern Africa, where Islam does not dominate and things are more chaotic.