For float, fixing up the modifier ourselves is easy. For int, we have a
dedicated isub instruction anyway.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4139>
switch (op) {
case nir_op_iadd:
case nir_op_fadd:
+ case nir_op_fsub:
return BI_ADD;
case nir_op_i2i8:
case nir_op_fabs:
alu.src_abs[0] = true; /* MOV */
break;
+ case nir_op_fsub:
+ alu.src_neg[1] = true; /* ADD */
+ break;
case nir_op_fmax:
case nir_op_imax:
case nir_op_umax:
static const nir_shader_compiler_options bifrost_nir_options = {
.lower_ffma = true,
- .lower_sub = true,
.lower_scmp = true,
.lower_flrp32 = true,
.lower_flrp64 = true,