mesa/src/compiler
Alyssa Rosenzweig fb55d222fc nir/opt_reassociate: fix exactness bug
For an inexact-associative operation (fadd or fmul), can_reassociate ensures the
root of the chain is inexact to allow reassociating. However, build_chain just
checks for opcodes to match up after, although we do sum up exactness across the
chain. Although an Effort Was Made, it still seems incorrect to reassociate

   %3 = fadd! %0, %1
   %4 = fadd %3, %2

to instead be (ex.)

   %3 = fadd! %0, %2
   %4 = fadd! %3, %1

Closes: #14418
Fixes: e0b0f7e73c ("nir: add ALU reassocation pass")
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
(cherry picked from commit 0c49738211)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41269>
2026-04-29 17:54:44 +02:00
..
clc compiler/clc: Fix const correctness in libclc_add_generic_variants 2026-02-11 14:54:47 +00:00
glsl glcpp: fix paste within macro function expansion 2026-04-29 17:54:42 +02:00
isaspec treewide: use BITSET_BYTES, BITSET_RZALLOC 2025-11-05 18:44:23 +00:00
libcl libcl: avoid calling UNREACHABLE(str) macro without arguments 2025-08-04 23:15:18 +02:00
nir nir/opt_reassociate: fix exactness bug 2026-04-29 17:54:44 +02:00
rust compiler/rust: drop "borrow of a value the compiler would automatically borrow" 2025-12-20 00:13:19 +01:00
spirv spirv: fix OpUntypedVariableKHR with optional data type parameter 2026-04-14 15:27:44 +02:00
builtin_types.py compiler: add float8 glsl types 2025-06-23 07:59:24 +00:00
builtin_types_c.py util,vulkan,mesa,compiler: Generate source files with utf8 encoding from mako template 2023-12-07 12:41:07 +00:00
builtin_types_h.py compiler: Generate files with newline at end 2025-06-24 14:01:04 +00:00
glsl_types.c compiler: Add FP8 types to GLSL type decoder 2025-12-19 00:09:53 +00:00
glsl_types.h spirv: Fix spec constant to handle Select for non-native floats 2026-03-11 23:21:10 +01:00
list.h nir: remove unused stuff from list.h 2025-07-31 20:23:04 +00:00
meson.build nir, glsl: Add support for softfloat32 2025-11-14 19:31:17 +00:00
shader_enums.c nir,radeonsi: simplify load_color0 & load_color1 intrinsics and shader_info 2026-01-01 18:30:28 +00:00
shader_enums.h nir: document that both input and output denorms have to be flushed 2026-01-19 16:11:28 +00:00
shader_info.h glsl/nir: Add texture_buffers to shader info 2026-01-13 10:00:58 +01:00