ALU_CASE(fabs, fmov);
ALU_CASE(fneg, fmov);
ALU_CASE(fsat, fmov);
+ ALU_CASE(fsat_signed, fmov);
+ ALU_CASE(fclamp_pos, fmov);
/* For size conversion, we use a move. Ideally though we would squash
* these ops together; maybe that has to happen after in NIR as part of
(('b32csel', a, 'b@32', 0), ('iand', a, b)),
(('b32csel', a, 0, 'b@32'), ('iand', ('inot', a), b)),
+
+ # Fuse sat_signed. This should probably be shared with Bifrost
+ (('~fmin', ('fmax', a, -1.0), 1.0), ('fsat_signed', a)),
+ (('~fmax', ('fmin', a, 1.0), -1.0), ('fsat_signed', a)),
+
+ # Fuse clamp_positive. This should probably be shared with Utgard/bifrost
+ (('fmax', a, 0.0), ('fclamp_pos', a)),
]