mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-16 13:40:29 +01:00
intel/nir: Make ffma peephole optimization preserve fp_fast_math flags
float_controls2 may have marked these as needing to preserve NaN or
other values. If so, our newly contracted ffma needs to as well.
Fixes dEQP-VK.spirv_assembly.instruction.compute.float_controls2.*.input_args.mat_det_testedWithout_NotNan*
when nir_opt_algebraic is run after this pass.
Cc: mesa-stable
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36750>
(cherry picked from commit 1b0808adf3)
This commit is contained in:
parent
f0d08a5ceb
commit
84739d85bf
2 changed files with 2 additions and 1 deletions
|
|
@ -124,7 +124,7 @@
|
|||
"description": "intel/nir: Make ffma peephole optimization preserve fp_fast_math flags",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -224,6 +224,7 @@ intel_nir_opt_peephole_ffma_instr(nir_builder *b,
|
|||
mul_src[0] = nir_fneg(b, mul_src[0]);
|
||||
|
||||
nir_alu_instr *ffma = nir_alu_instr_create(b->shader, nir_op_ffma);
|
||||
ffma->fp_fast_math = mul->fp_fast_math | add->fp_fast_math;
|
||||
|
||||
for (unsigned i = 0; i < 2; i++) {
|
||||
ffma->src[i].src = nir_src_for_ssa(mul_src[i]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue