mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 20:28:04 +02:00
nir: Add an option to lower 64bit iadd_sat.
Signed-off-by: Georg Lehmann <dadschoorse@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15421>
This commit is contained in:
parent
922916bf64
commit
16be909936
2 changed files with 3 additions and 2 deletions
|
|
@ -3148,6 +3148,7 @@ typedef enum {
|
|||
nir_lower_scan_reduce_iadd64 = (1 << 18),
|
||||
nir_lower_vote_ieq64 = (1 << 19),
|
||||
nir_lower_usub_sat64 = (1 << 20),
|
||||
nir_lower_iadd_sat64 = (1 << 21),
|
||||
} nir_lower_int64_options;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
|
|
@ -1702,7 +1702,7 @@ optimizations.extend([
|
|||
('ior', ('ior', ('ilt', a, 0), ('ilt', b, 0)), ('ige', ('iadd', a, b), 0)),
|
||||
('iadd', a, b),
|
||||
0x7fffffffffffffff)),
|
||||
'(options->lower_int64_options & nir_lower_iadd64) != 0'),
|
||||
'(options->lower_int64_options & nir_lower_iadd_sat64) != 0'),
|
||||
|
||||
# int64_t sum = a - b;
|
||||
#
|
||||
|
|
@ -1720,7 +1720,7 @@ optimizations.extend([
|
|||
('ior', ('ior', ('ilt', a, 0), ('ige', b, 0)), ('ige', ('isub', a, b), 0)),
|
||||
('isub', a, b),
|
||||
0x7fffffffffffffff)),
|
||||
'(options->lower_int64_options & nir_lower_iadd64) != 0'),
|
||||
'(options->lower_int64_options & nir_lower_iadd_sat64) != 0'),
|
||||
|
||||
# These are done here instead of in the backend because the int64 lowering
|
||||
# pass will make a mess of the patterns. The first patterns are
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue