Are you sure you are describing the circuit correctly? I simulted it and it does nothing, i..e. the voltage fed to the comparator is the same as the input AC voltage.
On the other hand, if the capacitor and resistor are in parallel, i.e. one side of each of them is connected to ground and...