[Mesa-dev] [PATCH 2/9] intel/compiler: remove check unsigned is >= 0

Lionel Landwerlin lionel.g.landwerlin at intel.com
Thu Jul 13 17:08:55 UTC 2017


By definition unsigned are always >= 0.

CID: 742212
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 src/intel/compiler/brw_eu_emit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/compiler/brw_eu_emit.c b/src/intel/compiler/brw_eu_emit.c
index 231d6fdaec0..0b0d67a5c56 100644
--- a/src/intel/compiler/brw_eu_emit.c
+++ b/src/intel/compiler/brw_eu_emit.c
@@ -306,7 +306,7 @@ validate_reg(const struct gen_device_info *devinfo,
        reg.nr == BRW_ARF_ACCUMULATOR)
       assert(reg.swizzle == BRW_SWIZZLE_XYZW);
 
-   assert(reg.hstride >= 0 && reg.hstride < ARRAY_SIZE(hstride_for_reg));
+   assert(reg.hstride < ARRAY_SIZE(hstride_for_reg));
    hstride = hstride_for_reg[reg.hstride];
 
    if (reg.vstride == 0xf) {
-- 
2.13.2



More information about the mesa-dev mailing list