mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64
If ftrunc@64 is lowered by nir_lower_doubles it is turned into a comparable long series of 32 bit operations. If the hardware supports ffract@64 then nir_opt_algebraic can first lower ftrunc@64 to use some combinations with ffloor@64. They can then be turned into a combination of fsub@64 and ffract@64 resulting in less all-over instructions. Fixes:5218cff34bnir/algebraic: avoid double lowering of some fp64 operations Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29281> (cherry picked from commitf19f1ec17b)
This commit is contained in:
parent
4f57a4da87
commit
f8b6a9253a
2 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@
|
|||
"description": "nir/opt_algebraic: Allow two-step lowering of ftrunc@64 to use ffract@64",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "5218cff34b34cec4819a382c500934fd9d991a60",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -432,7 +432,7 @@ optimizations.extend([
|
|||
(('ftrunc@16', a), ('bcsel', ('flt', a, 0.0), ('fneg', ('ffloor', ('fabs', a))), ('ffloor', ('fabs', a))), 'options->lower_ftrunc'),
|
||||
(('ftrunc@32', a), ('bcsel', ('flt', a, 0.0), ('fneg', ('ffloor', ('fabs', a))), ('ffloor', ('fabs', a))), 'options->lower_ftrunc'),
|
||||
(('ftrunc@64', a), ('bcsel', ('flt', a, 0.0), ('fneg', ('ffloor', ('fabs', a))), ('ffloor', ('fabs', a))),
|
||||
'(options->lower_ftrunc || (options->lower_doubles_options & nir_lower_dtrunc)) && !(options->lower_doubles_options & nir_lower_dfloor)'),
|
||||
'(options->lower_ftrunc || (options->lower_doubles_options & nir_lower_dtrunc)) && (!(options->lower_doubles_options & nir_lower_dfloor) || !(options->lower_doubles_options & nir_lower_dfract))'),
|
||||
|
||||
(('ffloor@16', a), ('fsub', a, ('ffract', a)), 'options->lower_ffloor'),
|
||||
(('ffloor@32', a), ('fsub', a, ('ffract', a)), 'options->lower_ffloor'),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue