Mesa (main): intel/compiler: compute int64_options based on devinfo->has_64bit_int

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 2 23:38:29 UTC 2022


Module: Mesa
Branch: main
Commit: 8f02e6cb19f2c743fefcebebb70f532ce988a7bf
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8f02e6cb19f2c743fefcebebb70f532ce988a7bf

Author: Paulo Zanoni <paulo.r.zanoni at intel.com>
Date:   Wed Mar  9 16:56:08 2022 -0800

intel/compiler: compute int64_options based on devinfo->has_64bit_int

Don't compute it based on devinfo->has_64bit_float. Othwerwise we may
end up emitting 64bit-int (Q) instructions on platforms with 64bit
floats but not 64bit integers.

Right now, the only platforms where has_64bit_int is different from
has_64bit_float are the platforms that use GFX7_FEATURES.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15835>

---

 src/intel/compiler/brw_compiler.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/intel/compiler/brw_compiler.c b/src/intel/compiler/brw_compiler.c
index 5f8c8b83fdc..0efb711c97a 100644
--- a/src/intel/compiler/brw_compiler.c
+++ b/src/intel/compiler/brw_compiler.c
@@ -146,10 +146,10 @@ brw_compiler_create(void *mem_ctx, const struct intel_device_info *devinfo)
       nir_lower_dsub |
       nir_lower_ddiv;
 
-   if (!devinfo->has_64bit_float || INTEL_DEBUG(DEBUG_SOFT64)) {
-      int64_options |= (nir_lower_int64_options)~0;
+   if (!devinfo->has_64bit_float || INTEL_DEBUG(DEBUG_SOFT64))
       fp64_options |= nir_lower_fp64_full_software;
-   }
+   if (!devinfo->has_64bit_int)
+      int64_options |= (nir_lower_int64_options)~0;
 
    /* The Bspec's section tittled "Instruction_multiply[DevBDW+]" claims that
     * destination type can be Quadword and source type Doubleword for Gfx8 and



More information about the mesa-commit mailing list