diff --git a/src/intel/compiler/brw/brw_eu_validate.c b/src/intel/compiler/brw/brw_eu_validate.c index 574166c5197..b6168cdd41a 100644 --- a/src/intel/compiler/brw/brw_eu_validate.c +++ b/src/intel/compiler/brw/brw_eu_validate.c @@ -2281,6 +2281,15 @@ instruction_restrictions(const struct brw_isa_info *isa, ERROR_IF(!src_has_scalar_region(inst, 0), "LINE/PLN source 0 must be a scalar."); } + + if (inst->opcode == BRW_OPCODE_ROR || + inst->opcode == BRW_OPCODE_ROL) { + ERROR_IF(inst->dst.type != BRW_TYPE_UD && + inst->dst.type != BRW_TYPE_UW, + "ROR/ROL dst type must be either UD or UW."); + ERROR_IF(inst->dst.type != inst->src[0].type, + "ROR/ROL src0 and dst must be of same datatype precision."); + } } static void diff --git a/src/intel/compiler/brw/brw_generator.cpp b/src/intel/compiler/brw/brw_generator.cpp index 35c13f9386f..44a7ae0a916 100644 --- a/src/intel/compiler/brw/brw_generator.cpp +++ b/src/intel/compiler/brw/brw_generator.cpp @@ -1005,12 +1005,10 @@ brw_generator::generate_code(const brw_shader &s, break; case BRW_OPCODE_ROL: assert(devinfo->ver >= 11); - assert(src[0].type == dst.type); brw_ROL(p, dst, src[0], src[1]); break; case BRW_OPCODE_ROR: assert(devinfo->ver >= 11); - assert(src[0].type == dst.type); brw_ROR(p, dst, src[0], src[1]); break; case BRW_OPCODE_CMP: