[Intel-gfx] [RFC 14/15] drm/i915: Use new IS_GEN range helpers
Chris Wilson
chris at chris-wilson.co.uk
Fri Feb 9 15:01:08 UTC 2018
Quoting Ville Syrjälä (2018-02-09 14:48:43)
> If only the compiler would be smart and be able to see that something
> like
>
> #define INTEL_GEN(dev_priv) (ilog2((dev_priv)->gen_mask & CONFIG_GEN_MASK))
>
> if (INTEL_GEN(dev_priv) < 8)
> ...
>
> can never be true...
>
> Not sure it can't actually. But I assume people have actually tried
> that.
gcc-7 doesn't appear to be that smart. :(
add/remove: 5/6 grow/shrink: 246/26 up/down: 10387/-3793 (6594)
-Chris
More information about the Intel-gfx
mailing list