From c64d7aa8e3216e5627c41f4fa31ff70c964ca91f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Thu, 18 Feb 2021 09:37:44 -0600 Subject: [PATCH] intel/mi_builder: Fix a misleading comment This doesn't actually assume the top 32 bits of the source value are zero. Instead, it does (src >> shift) & UINT32_MAX regardless of what the top bits of src are. Reviewed-by: Ian Romanick Part-of: --- src/intel/common/gen_mi_builder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/common/gen_mi_builder.h b/src/intel/common/gen_mi_builder.h index 24e16ac38b4..79a167991e4 100644 --- a/src/intel/common/gen_mi_builder.h +++ b/src/intel/common/gen_mi_builder.h @@ -868,7 +868,7 @@ gen_mi_ushr32_imm(struct gen_mi_builder *b, struct gen_mi_value src, uint32_t shift) { /* We right-shift by left-shifting by 32 - shift and taking the top 32 bits - * of the result. This assumes the top 32 bits are zero. + * of the result. */ if (shift > 64) return gen_mi_imm(0);