The attached kernel crashes the Intel OpenCL Runtime 15.1 (Ubuntu):
Both operands to ICmp instruction are not of the same type! %37 = icmp slt i32 %35, i64 0 Both operands to a binary operator are not of the same type! %47 = add i32 %36, i64 1 Both operands to a binary operator are not of the same type! %48 = add i32 %47, i64 %24 Both operands to ICmp instruction are not of the same type! %51 = icmp slt i64 %44, i32 %50 Both operands to ICmp instruction are not of the same type! %52 = icmp slt i32 %50, i64 0 Invalid operands for select instruction! %54 = select i1 %53, i64 %44, i32 %50 Broken module found, compilation aborted! Stack dump: 0. Running pass 'Function Pass Manager' on module 'main'. 1. Running pass 'Module Verifier' on function '@layerpot'  25966 abort python -c
Here's a quick one-liner to reproduce the crash.
python -c 'import pyopencl as cl ; ctx = cl._csc(); cl.Program(ctx, open("qbx.cl.txt").read()).build()'
Just verified that this works fine on Windows CPU OpenCL. Could you please provide your system details, e.g. you CPU, version of Ubuntu you are running, version of the OpenCL Code Builder you installed? It will help to file a bug with the product team. Thanks!
CPU: Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
OS: Debian jessie (8.0) -- Ubuntu 14.10 is the most closely related version
I downloaded intel_code_builder_for_opencl_2015_ubuntu_126.96.36.199_x64.tgz