case nir_op_u2f:
if (optimize_extract_to_float(instr, result))
return;
+ inst = bld.MOV(result, op[0]);
+ inst->saturate = instr->dest.saturate;
+ break;
case nir_op_f2d:
case nir_op_i2d:
case nir_op_u2d:
+ /* CHV PRM, vol07, 3D Media GPGPU Engine, Register Region Restrictions:
+ *
+ * "When source or destination is 64b (...), regioning in Align1
+ * must follow these rules:
+ *
+ * 1. Source and destination horizontal stride must be aligned to
+ * the same qword.
+ * (...)"
+ *
+ * This means that 32-bit to 64-bit conversions need to have the 32-bit
+ * data elements aligned to 64-bit. This restriction does not apply to
+ * BDW and later.
+ */
+ if (devinfo->is_cherryview || devinfo->is_broxton) {
+ fs_reg tmp = bld.vgrf(result.type, 1);
+ tmp = subscript(tmp, op[0].type, 0);
+ inst = bld.MOV(tmp, op[0]);
+ inst = bld.MOV(result, tmp);
+ inst->saturate = instr->dest.saturate;
+ break;
+ }
+ /* fallthrough */
case nir_op_d2f:
case nir_op_d2i:
case nir_op_d2u: