Timer interrupt strange behavior

I am using CMSIS code.
I have the following ISR to blink an LED:

extern “C”{
void TIMER0_IRQHandler() {
LPC_TIM0->IR =1;

LPC_GPIO1->FIOPIN ^=(1 << 23); }}

It works perfectly!

If I swap the two statements inside the lSR ( Clear the interrupt after the toggling), IT STOPPED WORKING!!!

Any possible explanation?

Thanks