OpenCLOn12: Affinity Photo CL kernels produce invalid DXIL phis
Still chasing down the CL kernel source from a crash dump, but the invalid DXIL looks like
; <label>:218 ; preds = %217, %202
%219 = phi i32 [ %213, %202 ], [ 0, %217 ]
%220 = phi i32 [ %214, %202 ], [ 0, %217 ]
%221 = phi i32 [ %215, %202 ], [ 0, %217 ]
%222 = phi i32 [ %216, %202 ], [ 0, %217 ]
%223 = and i32 %219, 255
%224 = and i32 %220, 255
%225 = and i32 %221, 255
%226 = and i32 %222, 255
%227 = phi i1 [ false, %202 ], [ true, %217 ]
br i1 %227, label %228, label %241
Which the DXIL validator complains:
PHI nodes not grouped at top of basic block!
%227 = phi i1 [ false, %202 ], [ true, %217 ]
label %218