aco: use v_subrev_f32 for fsub with an sgpr operand in src1
authorDaniel Schürmann <daniel@schuermann.dev>
Sun, 19 Apr 2020 15:17:04 +0000 (16:17 +0100)
committerMarge Bot <eric+marge@anholt.net>
Sun, 19 Apr 2020 16:16:27 +0000 (16:16 +0000)
This fixes an accidentally introduced regression.

Fixes: 9be4be515f2a08b9c9e5ae1fc4c5dc9a830c2337 ('aco: implement 16-bit nir_op_fsub/nir_op_fadd')
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4633>

src/amd/compiler/aco_instruction_selection.cpp

index b4db7a0d66dce89631985bd7eb19524450a95c23..af1a5e4f1119240f53c323ed47fa70d5ce77c81a 100644 (file)
@@ -1639,7 +1639,7 @@ void visit_alu_instr(isel_context *ctx, nir_alu_instr *instr)
    }
    case nir_op_fsub: {
       Temp src0 = get_alu_src(ctx, instr->src[0]);
-      Temp src1 = as_vgpr(ctx, get_alu_src(ctx, instr->src[1]));
+      Temp src1 = get_alu_src(ctx, instr->src[1]);
       if (dst.regClass() == v2b) {
          Temp tmp = bld.tmp(v1);
          if (src1.type() == RegType::vgpr || src0.type() != RegType::vgpr)