[Mesa-dev] [PATCH 2/3] intel/compiler: add a region_match() helper
Caio Marcelo de Oliveira Filho
caio.oliveira at intel.com
Wed Jul 4 01:23:51 UTC 2018
> +/**
> + * Check that the register region given by r [r.offset, r.offset + dr[
> + * is exactly the same as the the register region given by s
> + * [s.offset, s.offset + ds[
> + */
> +static inline bool
> +region_match(const fs_reg &r, unsigned dr, const fs_reg &s, unsigned ds)
> +{
> + return reg_space(r) == reg_space(s) &&
> + reg_offset(r) == reg_offset(s) &&
> + reg_offset(r) + dr == reg_offset(s) + ds;
The last condition could be simplified to: "dr == ds".
Thanks,
Caio
More information about the mesa-dev
mailing list