Do you know why page 10 of DER 442 calls U6D a comparator?. This is an opamp.https://led-driver.power.com/design-support/reference-designs/design-examples/der-442-30-w-isolated-flyback-1-10-v/
The U6, LM324M, used in DER-442 has 4 independent operational amplifiers in a single package. For the 4th op-amp or the U6D defined in DER, it was used as a comparator as one typical application of LM324M.
The comparator function is needed to generate a sinusoidal output voltage waveform inversely proportional to output current (voltage signal from current sense resistor fed to inverting pin of U6D) and directly proportional to dimming input voltage (fed to non-inverting pin via the buffer amplifier and sampling resistors).
This output of comparator U6D will drive the optocoupler to provide feedback signal to IFB during dimming.