[Mesa-dev] [RFC 1/5] nir: Rename nir_op_fne to nir_op_fneu

Jason Ekstrand jason at jlekstrand.net
Thu Nov 22 18:46:44 UTC 2018


This way, it's explicit in the opcode name that it's an unordered
comparison.
---
 src/amd/common/ac_nir_to_llvm.c               |  2 +-
 src/compiler/glsl/glsl_to_nir.cpp             |  4 +-
 src/compiler/nir/nir.h                        |  2 +-
 src/compiler/nir/nir_builder.h                |  2 +-
 src/compiler/nir/nir_loop_analyze.c           |  4 +-
 src/compiler/nir/nir_lower_alu_to_scalar.c    |  2 +-
 src/compiler/nir/nir_lower_double_ops.c       |  6 +--
 src/compiler/nir/nir_opcodes.py               |  2 +-
 src/compiler/nir/nir_opt_algebraic.py         | 46 +++++++++----------
 src/compiler/spirv/vtn_alu.c                  | 10 ++--
 src/compiler/spirv/vtn_glsl450.c              |  4 +-
 src/gallium/auxiliary/nir/tgsi_to_nir.c       |  4 +-
 .../drivers/freedreno/ir3/ir3_compiler_nir.c  |  2 +-
 src/gallium/drivers/vc4/vc4_program.c         |  4 +-
 src/intel/compiler/brw_fs_nir.cpp             |  4 +-
 src/intel/compiler/brw_vec4_nir.cpp           |  4 +-
 16 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index a109f5a8156..c82c2ab548d 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -708,7 +708,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
 	case nir_op_feq:
 		result = emit_float_cmp(&ctx->ac, LLVMRealOEQ, src[0], src[1]);
 		break;
-	case nir_op_fne:
+	case nir_op_fneu:
 		result = emit_float_cmp(&ctx->ac, LLVMRealUNE, src[0], src[1]);
 		break;
 	case nir_op_flt:
diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
index 9f73b721e39..fd6e0cc48ad 100644
--- a/src/compiler/glsl/glsl_to_nir.cpp
+++ b/src/compiler/glsl/glsl_to_nir.cpp
@@ -1835,7 +1835,7 @@ nir_visitor::visit(ir_expression *ir)
    case ir_binop_nequal:
       if (supports_ints) {
          if (type_is_float(types[0]))
-            result = nir_fne(&b, srcs[0], srcs[1]);
+            result = nir_fneu(&b, srcs[0], srcs[1]);
          else
             result = nir_ine(&b, srcs[0], srcs[1]);
       } else {
@@ -1878,7 +1878,7 @@ nir_visitor::visit(ir_expression *ir)
       if (supports_ints) {
          if (type_is_float(types[0])) {
             switch (ir->operands[0]->type->vector_elements) {
-               case 1: result = nir_fne(&b, srcs[0], srcs[1]); break;
+               case 1: result = nir_fneu(&b, srcs[0], srcs[1]); break;
                case 2: result = nir_bany_fnequal2(&b, srcs[0], srcs[1]); break;
                case 3: result = nir_bany_fnequal3(&b, srcs[0], srcs[1]); break;
                case 4: result = nir_bany_fnequal4(&b, srcs[0], srcs[1]); break;
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index a292ec73e1e..4271f237235 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -1561,7 +1561,7 @@ nir_alu_instr_is_comparison(const nir_alu_instr *instr)
    case nir_op_flt:
    case nir_op_fge:
    case nir_op_feq:
-   case nir_op_fne:
+   case nir_op_fneu:
    case nir_op_ilt:
    case nir_op_ult:
    case nir_op_ige:
diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h
index 30fa1d7ec8b..d520526e779 100644
--- a/src/compiler/nir/nir_builder.h
+++ b/src/compiler/nir/nir_builder.h
@@ -993,7 +993,7 @@ nir_compare_func(nir_builder *b, enum compare_func func,
    case COMPARE_FUNC_EQUAL:
       return nir_feq(b, src0, src1);
    case COMPARE_FUNC_NOTEQUAL:
-      return nir_fne(b, src0, src1);
+      return nir_fneu(b, src0, src1);
    case COMPARE_FUNC_GREATER:
       return nir_flt(b, src1, src0);
    case COMPARE_FUNC_GEQUAL:
diff --git a/src/compiler/nir/nir_loop_analyze.c b/src/compiler/nir/nir_loop_analyze.c
index 9c3fd2f286f..d73314a8a44 100644
--- a/src/compiler/nir/nir_loop_analyze.c
+++ b/src/compiler/nir/nir_loop_analyze.c
@@ -376,7 +376,7 @@ get_iteration(nir_op cond_op, nir_const_value *initial, nir_const_value *step,
    case nir_op_fge:
    case nir_op_flt:
    case nir_op_feq:
-   case nir_op_fne: {
+   case nir_op_fneu: {
       float initial_val = initial->f32[0];
       float span = limit->f32[0] - initial_val;
       iter = span / step->f32[0];
@@ -550,7 +550,7 @@ find_trip_count(loop_info_state *state)
       case nir_op_fge:      case nir_op_ige:      case nir_op_uge:
       case nir_op_flt:      case nir_op_ilt:      case nir_op_ult:
       case nir_op_feq:      case nir_op_ieq:
-      case nir_op_fne:      case nir_op_ine:
+      case nir_op_fneu:     case nir_op_ine:
 
          /* We assume that the limit is the "right" operand */
          basic_ind = get_loop_var(alu->src[0].src.ssa, state);
diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c
index 7ef032cd164..ef580fb3821 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -200,7 +200,7 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
       LOWER_REDUCTION(nir_op_fdot, nir_op_fmul, nir_op_fadd);
       LOWER_REDUCTION(nir_op_ball_fequal, nir_op_feq, nir_op_iand);
       LOWER_REDUCTION(nir_op_ball_iequal, nir_op_ieq, nir_op_iand);
-      LOWER_REDUCTION(nir_op_bany_fnequal, nir_op_fne, nir_op_ior);
+      LOWER_REDUCTION(nir_op_bany_fnequal, nir_op_fneu, nir_op_ior);
       LOWER_REDUCTION(nir_op_bany_inequal, nir_op_ine, nir_op_ior);
       LOWER_REDUCTION(nir_op_fall_equal, nir_op_seq, nir_op_fand);
       LOWER_REDUCTION(nir_op_fany_nequal, nir_op_sne, nir_op_for);
diff --git a/src/compiler/nir/nir_lower_double_ops.c b/src/compiler/nir/nir_lower_double_ops.c
index b3543bc6963..2e6dba43893 100644
--- a/src/compiler/nir/nir_lower_double_ops.c
+++ b/src/compiler/nir/nir_lower_double_ops.c
@@ -100,7 +100,7 @@ fix_inv_result(nir_builder *b, nir_ssa_def *res, nir_ssa_def *src,
                    nir_imm_double(b, 0.0f), res);
 
    /* If the original input was 0, generate the correctly-signed infinity */
-   res = nir_bcsel(b, nir_fne(b, src, nir_imm_double(b, 0.0f)),
+   res = nir_bcsel(b, nir_fneu(b, src, nir_imm_double(b, 0.0f)),
                    res, get_signed_inf(b, src));
 
    return res;
@@ -427,7 +427,7 @@ lower_round_even(nir_builder *b, nir_ssa_def *src)
     */
    nir_ssa_def *fract = nir_ffract(b, src);
    return nir_bcsel(b,
-                    nir_fne(b, fract, nir_imm_double(b, 0.5)),
+                    nir_fneu(b, fract, nir_imm_double(b, 0.5)),
                     nir_ffloor(b, nir_fadd(b, src, nir_imm_double(b, 0.5))),
                     nir_bcsel(b,
                               nir_flt(b, mod, nir_imm_double(b, 1.0)),
@@ -451,7 +451,7 @@ lower_mod(nir_builder *b, nir_ssa_def *src0, nir_ssa_def *src1)
    nir_ssa_def *mod = nir_fsub(b, src0, nir_fmul(b, src1, floor));
 
    return nir_bcsel(b,
-                    nir_fne(b, mod, src1),
+                    nir_fneu(b, mod, src1),
                     mod,
                     nir_imm_double(b, 0.0));
 }
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index 4ef4ecc6f22..2375309aca6 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -491,7 +491,7 @@ binop("frem", tfloat, "", "src0 - src1 * truncf(src0 / src1)")
 binop_compare("flt", tfloat, "", "src0 < src1")
 binop_compare("fge", tfloat, "", "src0 >= src1")
 binop_compare("feq", tfloat, commutative, "src0 == src1")
-binop_compare("fne", tfloat, commutative, "src0 != src1")
+binop_compare("fneu", tfloat, commutative, "src0 != src1")
 binop_compare("ilt", tint, "", "src0 < src1")
 binop_compare("ige", tint, "", "src0 >= src1")
 binop_compare("ieq", tint, commutative, "src0 == src1")
diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py
index 0d8802582aa..131d2721934 100644
--- a/src/compiler/nir/nir_opt_algebraic.py
+++ b/src/compiler/nir/nir_opt_algebraic.py
@@ -155,8 +155,8 @@ optimizations = [
    # Comparison simplifications
    (('~inot', ('flt', a, b)), ('fge', a, b)),
    (('~inot', ('fge', a, b)), ('flt', a, b)),
-   (('~inot', ('feq', a, b)), ('fne', a, b)),
-   (('~inot', ('fne', a, b)), ('feq', a, b)),
+   (('inot', ('feq', a, b)), ('fneu', a, b)),
+   (('inot', ('fneu', a, b)), ('feq', a, b)),
    (('inot', ('ilt', a, b)), ('ige', a, b)),
    (('inot', ('ult', a, b)), ('uge', a, b)),
    (('inot', ('ige', a, b)), ('ilt', a, b)),
@@ -172,16 +172,16 @@ optimizations = [
 
    (('fge', ('fneg', ('b2f', a)), 0.0), ('inot', a)),
 
-   (('fne', ('fadd', ('b2f', a), ('b2f', b)), 0.0), ('ior', a, b)),
-   (('fne', ('fmax', ('b2f', a), ('b2f', b)), 0.0), ('ior', a, b)),
-   (('fne', ('bcsel', a, 1.0, ('b2f', b))   , 0.0), ('ior', a, b)),
-   (('fne', ('b2f', a), ('fneg', ('b2f', b))),      ('ior', a, b)),
-   (('fne', ('fmul', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
-   (('fne', ('fmin', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
-   (('fne', ('bcsel', a, ('b2f', b), 0.0)   , 0.0), ('iand', a, b)),
-   (('fne', ('fadd', ('b2f', a), ('fneg', ('b2f', b))), 0.0), ('ixor', a, b)),
-   (('fne',          ('b2f', a) ,          ('b2f', b) ),      ('ixor', a, b)),
-   (('fne', ('fneg', ('b2f', a)), ('fneg', ('b2f', b))),      ('ixor', a, b)),
+   (('fneu', ('fadd', ('b2f', a), ('b2f', b)), 0.0), ('ior', a, b)),
+   (('fneu', ('fmax', ('b2f', a), ('b2f', b)), 0.0), ('ior', a, b)),
+   (('fneu', ('bcsel', a, 1.0, ('b2f', b))   , 0.0), ('ior', a, b)),
+   (('fneu', ('b2f', a), ('fneg', ('b2f', b))),      ('ior', a, b)),
+   (('fneu', ('fmul', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
+   (('fneu', ('fmin', ('b2f', a), ('b2f', b)), 0.0), ('iand', a, b)),
+   (('fneu', ('bcsel', a, ('b2f', b), 0.0)   , 0.0), ('iand', a, b)),
+   (('fneu', ('fadd', ('b2f', a), ('fneg', ('b2f', b))), 0.0), ('ixor', a, b)),
+   (('fneu',          ('b2f', a) ,          ('b2f', b) ),      ('ixor', a, b)),
+   (('fneu', ('fneg', ('b2f', a)), ('fneg', ('b2f', b))),      ('ixor', a, b)),
    (('feq', ('fadd', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('ior', a, b))),
    (('feq', ('fmax', ('b2f', a), ('b2f', b)), 0.0), ('inot', ('ior', a, b))),
    (('feq', ('bcsel', a, 1.0, ('b2f', b))   , 0.0), ('inot', ('ior', a, b))),
@@ -217,7 +217,7 @@ optimizations = [
    (('~flt', ('fadd', a, b), a), ('flt', b, 0.0)),
    (('~fge', ('fadd', a, b), a), ('fge', b, 0.0)),
    (('~feq', ('fadd', a, b), a), ('feq', b, 0.0)),
-   (('~fne', ('fadd', a, b), a), ('fne', b, 0.0)),
+   (('~fneu', ('fadd', a, b), a), ('fneu', b, 0.0)),
 
    # Cannot remove the addition from ilt or ige due to overflow.
    (('ieq', ('iadd', a, b), a), ('ieq', b, 0)),
@@ -237,17 +237,17 @@ optimizations = [
    (('feq', ('fmin', ('fneg', ('b2f', a)), b), 0.0), ('iand', ('inot', a), ('fge', b, 0.0))),
 
    (('feq', ('b2f', a), 0.0), ('inot', a)),
-   (('fne', ('b2f', a), 0.0), a),
+   (('fneu', ('b2f', a), 0.0), a),
    (('ieq', ('b2i', a), 0),   ('inot', a)),
    (('ine', ('b2i', a), 0),   a),
 
-   (('fne', ('u2f32', a), 0.0), ('ine', a, 0)),
+   (('fneu', ('u2f32', a), 0.0), ('ine', a, 0)),
    (('feq', ('u2f32', a), 0.0), ('ieq', a, 0)),
    (('fge', ('u2f32', a), 0.0), True),
    (('fge', 0.0, ('u2f32', a)), ('uge', 0, a)),    # ieq instead?
    (('flt', ('u2f32', a), 0.0), False),
    (('flt', 0.0, ('u2f32', a)), ('ult', 0, a)),    # ine instead?
-   (('fne', ('i2f32', a), 0.0), ('ine', a, 0)),
+   (('fneu', ('i2f32', a), 0.0), ('ine', a, 0)),
    (('feq', ('i2f32', a), 0.0), ('ieq', a, 0)),
    (('fge', ('i2f32', a), 0.0), ('ige', a, 0)),
    (('fge', 0.0, ('i2f32', a)), ('ige', 0, a)),
@@ -258,11 +258,11 @@ optimizations = [
    # fabs(a) > 0.0
    # fabs(a) != 0.0 because fabs(a) must be >= 0
    # a != 0.0
-   (('~flt', 0.0, ('fabs', a)), ('fne', a, 0.0)),
+   (('~flt', 0.0, ('fabs', a)), ('fneu', a, 0.0)),
 
    # -fabs(a) < 0.0
    # fabs(a) > 0.0
-   (('~flt', ('fneg', ('fabs', a)), 0.0), ('fne', a, 0.0)),
+   (('~flt', ('fneg', ('fabs', a)), 0.0), ('fneu', a, 0.0)),
 
    # 0.0 >= fabs(a)
    # 0.0 == fabs(a)   because fabs(a) must be >= 0
@@ -430,8 +430,8 @@ optimizations = [
    (('slt', a, b), ('b2f', ('flt', a, b)), 'options->lower_scmp'),
    (('sge', a, b), ('b2f', ('fge', a, b)), 'options->lower_scmp'),
    (('seq', a, b), ('b2f', ('feq', a, b)), 'options->lower_scmp'),
-   (('sne', a, b), ('b2f', ('fne', a, b)), 'options->lower_scmp'),
-   (('fne', ('fneg', a), a), ('fne', a, 0.0)),
+   (('sne', a, b), ('b2f', ('fneu', a, b)), 'options->lower_scmp'),
+   (('fneu', ('fneg', a), a), ('fneu', a, 0.0)),
    (('feq', ('fneg', a), a), ('feq', a, 0.0)),
    # Emulating booleans
    (('imul', ('b2i', a), ('b2i', b)), ('b2i', ('iand', a, b))),
@@ -744,7 +744,7 @@ optimizations = [
      'options->lower_unpack_snorm_4x8'),
 ]
 
-invert = OrderedDict([('feq', 'fne'), ('fne', 'feq'), ('fge', 'flt'), ('flt', 'fge')])
+invert = OrderedDict([('feq', 'fneu'), ('fneu', 'feq'), ('fge', 'flt'), ('flt', 'fge')])
 
 for left, right in itertools.combinations_with_replacement(invert.keys(), 2):
    optimizations.append((('inot', ('ior(is_used_once)', (left, a, b), (right, c, d))),
@@ -846,7 +846,7 @@ for op in ['flt', 'fge', 'feq']:
 # which constant folding will eat for lunch.  The resulting ternary will
 # further get cleaned up by the boolean reductions above and we will be
 # left with just the original variable "a".
-for op in ['flt', 'fge', 'feq', 'fne',
+for op in ['flt', 'fge', 'feq', 'fneu',
            'ilt', 'ige', 'ieq', 'ine', 'ult', 'uge']:
    optimizations += [
       ((op, ('bcsel', 'a', '#b', '#c'), '#d'),
@@ -903,7 +903,7 @@ late_optimizations = [
    (('~fge',          ('fadd', a, b),  0.0), ('fge',          a, ('fneg', b))),
    (('~fge', ('fneg', ('fadd', a, b)), 0.0), ('fge', ('fneg', a),         b)),
    (('~feq', ('fadd', a, b), 0.0), ('feq', a, ('fneg', b))),
-   (('~fne', ('fadd', a, b), 0.0), ('fne', a, ('fneg', b))),
+   (('~fneu', ('fadd', a, b), 0.0), ('fneu', a, ('fneg', b))),
 
    (('~fge', ('fmin(is_used_once)', ('fadd(is_used_once)', a, b), ('fadd', c, d)), 0.0), ('iand', ('fge', a, ('fneg', b)), ('fge', c, ('fneg', d)))),
 
diff --git a/src/compiler/spirv/vtn_alu.c b/src/compiler/spirv/vtn_alu.c
index dc6fedc9129..cff8c76b2a3 100644
--- a/src/compiler/spirv/vtn_alu.c
+++ b/src/compiler/spirv/vtn_alu.c
@@ -267,8 +267,8 @@ vtn_nir_alu_op_for_spirv_opcode(struct vtn_builder *b,
    case SpvOpFOrdEqual:                            return nir_op_feq;
    case SpvOpFUnordEqual:                          return nir_op_feq;
    case SpvOpINotEqual:                            return nir_op_ine;
-   case SpvOpFOrdNotEqual:                         return nir_op_fne;
-   case SpvOpFUnordNotEqual:                       return nir_op_fne;
+   case SpvOpFOrdNotEqual:                         return nir_op_fneu;
+   case SpvOpFUnordNotEqual:                       return nir_op_fneu;
    case SpvOpULessThan:                            return nir_op_ult;
    case SpvOpSLessThan:                            return nir_op_ilt;
    case SpvOpFOrdLessThan:                         return nir_op_flt;
@@ -499,7 +499,7 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
       break;
 
    case SpvOpIsNan:
-      val->ssa->def = nir_fne(&b->nb, src[0], src[0]);
+      val->ssa->def = nir_fneu(&b->nb, src[0], src[0]);
       break;
 
    case SpvOpIsInf: {
@@ -530,8 +530,8 @@ vtn_handle_alu(struct vtn_builder *b, SpvOp opcode,
          nir_ior(&b->nb,
                  nir_build_alu(&b->nb, op, src[0], src[1], NULL, NULL),
                  nir_ior(&b->nb,
-                         nir_fne(&b->nb, src[0], src[0]),
-                         nir_fne(&b->nb, src[1], src[1])));
+                         nir_fneu(&b->nb, src[0], src[0]),
+                         nir_fneu(&b->nb, src[1], src[1])));
       break;
    }
 
diff --git a/src/compiler/spirv/vtn_glsl450.c b/src/compiler/spirv/vtn_glsl450.c
index 06a49e48e3f..9ef76f54051 100644
--- a/src/compiler/spirv/vtn_glsl450.c
+++ b/src/compiler/spirv/vtn_glsl450.c
@@ -386,7 +386,7 @@ build_frexp32(nir_builder *b, nir_ssa_def *x, nir_ssa_def **exponent)
    /* Exponent of floating-point values in the range [0.5, 1.0). */
    nir_ssa_def *exponent_value = nir_imm_int(b, 0x3f000000u);
 
-   nir_ssa_def *is_not_zero = nir_fne(b, abs_x, zero);
+   nir_ssa_def *is_not_zero = nir_fneu(b, abs_x, zero);
 
    *exponent =
       nir_iadd(b, nir_ushr(b, abs_x, exponent_shift),
@@ -426,7 +426,7 @@ build_frexp64(nir_builder *b, nir_ssa_def *x, nir_ssa_def **exponent)
    /* Exponent of floating-point values in the range [0.5, 1.0). */
    nir_ssa_def *exponent_value = nir_imm_int(b, 0x3fe00000u);
 
-   nir_ssa_def *is_not_zero = nir_fne(b, abs_x, zero);
+   nir_ssa_def *is_not_zero = nir_fneu(b, abs_x, zero);
 
    *exponent =
       nir_iadd(b, nir_ushr(b, abs_upper_x, exponent_shift),
diff --git a/src/gallium/auxiliary/nir/tgsi_to_nir.c b/src/gallium/auxiliary/nir/tgsi_to_nir.c
index 0ad274b535a..de9da0a27bd 100644
--- a/src/gallium/auxiliary/nir/tgsi_to_nir.c
+++ b/src/gallium/auxiliary/nir/tgsi_to_nir.c
@@ -959,7 +959,7 @@ ttn_if(struct ttn_compile *c, nir_ssa_def *src, bool is_uint)
    if (is_uint) {
       if_stmt->condition = nir_src_for_ssa(nir_ine(b, src, nir_imm_int(b, 0)));
    } else {
-      if_stmt->condition = nir_src_for_ssa(nir_fne(b, src, nir_imm_int(b, 0)));
+      if_stmt->condition = nir_src_for_ssa(nir_fneu(b, src, nir_imm_int(b, 0)));
    }
    nir_builder_cf_insert(b, &if_stmt->cf_node);
 
@@ -1474,7 +1474,7 @@ static const nir_op op_trans[TGSI_OPCODE_LAST] = {
    [TGSI_OPCODE_FSEQ] = nir_op_feq,
    [TGSI_OPCODE_FSGE] = nir_op_fge,
    [TGSI_OPCODE_FSLT] = nir_op_flt,
-   [TGSI_OPCODE_FSNE] = nir_op_fne,
+   [TGSI_OPCODE_FSNE] = nir_op_fneu,
 
    [TGSI_OPCODE_KILL_IF] = 0,
 
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 0c7a722aa0c..3f8e414d090 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -1191,7 +1191,7 @@ emit_alu(struct ir3_context *ctx, nir_alu_instr *alu)
 		dst[0]->cat2.condition = IR3_COND_EQ;
 		dst[0] = ir3_n2b(b, dst[0]);
 		break;
-	case nir_op_fne:
+	case nir_op_fneu:
 		dst[0] = ir3_CMPS_F(b, src[0], 0, src[1], 0);
 		dst[0]->cat2.condition = IR3_COND_NE;
 		dst[0] = ir3_n2b(b, dst[0]);
diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index b98baca30cf..50f10baa7e1 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1009,7 +1009,7 @@ ntq_emit_comparison(struct vc4_compile *c, struct qreg *dest,
         case nir_op_seq:
                 cond = QPU_COND_ZS;
                 break;
-        case nir_op_fne:
+        case nir_op_fneu:
         case nir_op_ine:
         case nir_op_sne:
                 cond = QPU_COND_ZC;
@@ -1265,7 +1265,7 @@ ntq_emit_alu(struct vc4_compile *c, nir_alu_instr *instr)
         case nir_op_sge:
         case nir_op_slt:
         case nir_op_feq:
-        case nir_op_fne:
+        case nir_op_fneu:
         case nir_op_fge:
         case nir_op_flt:
         case nir_op_ieq:
diff --git a/src/intel/compiler/brw_fs_nir.cpp b/src/intel/compiler/brw_fs_nir.cpp
index 6eb68794f58..a62d521bb5d 100644
--- a/src/intel/compiler/brw_fs_nir.cpp
+++ b/src/intel/compiler/brw_fs_nir.cpp
@@ -1049,7 +1049,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
    case nir_op_flt:
    case nir_op_fge:
    case nir_op_feq:
-   case nir_op_fne: {
+   case nir_op_fneu: {
       fs_reg dest = result;
 
       const uint32_t bit_size =  nir_src_bit_size(instr->src[0].src);
@@ -1067,7 +1067,7 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
       case nir_op_feq:
          cond = BRW_CONDITIONAL_Z;
          break;
-      case nir_op_fne:
+      case nir_op_fneu:
          cond = BRW_CONDITIONAL_NZ;
          break;
       default:
diff --git a/src/intel/compiler/brw_vec4_nir.cpp b/src/intel/compiler/brw_vec4_nir.cpp
index 4bb4d0d4074..f7f46f5034c 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -853,7 +853,7 @@ brw_conditional_for_nir_comparison(nir_op op)
    case nir_op_ball_iequal4:
       return BRW_CONDITIONAL_Z;
 
-   case nir_op_fne:
+   case nir_op_fneu:
    case nir_op_ine:
    case nir_op_bany_fnequal2:
    case nir_op_bany_inequal2:
@@ -1345,7 +1345,7 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
    case nir_op_flt:
    case nir_op_fge:
    case nir_op_feq:
-   case nir_op_fne: {
+   case nir_op_fneu: {
       enum brw_conditional_mod conditional_mod =
          brw_conditional_for_nir_comparison(instr->op);
 
-- 
2.19.1



More information about the mesa-dev mailing list