OpenCL kernel optimization takes excessively long with large loop bounds

Hi,

compilation of the following program takes a very long time (> 1 minute):

__kernel void A() {
  for (int g = 0; g < 100000; g++) {
    barrier(1);
  }
}

If optimizations are disabled (-cl-opt-disable), compilation takes < 1 second.

This is on a GTX 1080 running driver 375.39 on Ubuntu Linux 16.04. On a GTX 780 with driver 361.42, compilation takes less than a second both with and without optimizations enabled.

Cheers,
Chris