diff options
Diffstat (limited to 'src/compiler/nir')
-rw-r--r-- | src/compiler/nir/nir.h | 1 | ||||
-rw-r--r-- | src/compiler/nir/nir_lower_alu_to_scalar.c | 4 | ||||
-rw-r--r-- | src/compiler/nir/nir_opcodes.py | 14 | ||||
-rw-r--r-- | src/compiler/nir/nir_opt_algebraic.py | 2 |
4 files changed, 2 insertions, 19 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index bc9122d1f25..94995ec37da 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1674,7 +1674,6 @@ nir_alu_instr_is_comparison(const nir_alu_instr *instr) case nir_op_i2b1: case nir_op_f2b1: case nir_op_inot: - case nir_op_fnot: return true; default: return false; diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c index 71389c2f0c3..f46e15e17fd 100644 --- a/src/compiler/nir/nir_lower_alu_to_scalar.c +++ b/src/compiler/nir/nir_lower_alu_to_scalar.c @@ -209,8 +209,8 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b, BITSET_WORD *lower_ LOWER_REDUCTION(nir_op_b32all_iequal, nir_op_ieq32, nir_op_iand); LOWER_REDUCTION(nir_op_b32any_fnequal, nir_op_fne32, nir_op_ior); LOWER_REDUCTION(nir_op_b32any_inequal, nir_op_ine32, 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); + LOWER_REDUCTION(nir_op_fall_equal, nir_op_seq, nir_op_fmin); + LOWER_REDUCTION(nir_op_fany_nequal, nir_op_sne, nir_op_fmax); default: break; diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index a12b0269e2e..26e26797585 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -190,8 +190,6 @@ unop("mov", tuint, "src0") unop("ineg", tint, "-src0") unop("fneg", tfloat, "-src0") unop("inot", tint, "~src0") # invert every bit of the integer -unop("fnot", tfloat, ("bit_size == 64 ? ((src0 == 0.0) ? 1.0 : 0.0f) : " + - "((src0 == 0.0f) ? 1.0f : 0.0f)")) unop("fsign", tfloat, ("bit_size == 64 ? " + "((src0 == 0.0) ? 0.0 : ((src0 > 0.0) ? 1.0 : -1.0)) : " + "((src0 == 0.0f) ? 0.0f : ((src0 > 0.0f) ? 1.0f : -1.0f))")) @@ -700,18 +698,6 @@ binop("ior", tuint, _2src_commutative + associative, "src0 | src1") binop("ixor", tuint, _2src_commutative + associative, "src0 ^ src1") -# floating point logic operators -# -# These use (src != 0.0) for testing the truth of the input, and output 1.0 -# for true and 0.0 for false - -binop("fand", tfloat32, _2src_commutative, - "((src0 != 0.0f) && (src1 != 0.0f)) ? 1.0f : 0.0f") -binop("for", tfloat32, _2src_commutative, - "((src0 != 0.0f) || (src1 != 0.0f)) ? 1.0f : 0.0f") -binop("fxor", tfloat32, _2src_commutative, - "(src0 != 0.0f && src1 == 0.0f) || (src0 == 0.0f && src1 != 0.0f) ? 1.0f : 0.0f") - binop_reduce("fdot", 1, tfloat, tfloat, "{src0} * {src1}", "{src0} + {src1}", "{src}") diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 4147be9c1f7..45e8779e16e 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -554,14 +554,12 @@ optimizations = [ (('ult', a, a), False), (('uge', a, a), True), # Logical and bit operations - (('fand', a, 0.0), 0.0), (('iand', a, a), a), (('iand', a, ~0), a), (('iand', a, 0), 0), (('ior', a, a), a), (('ior', a, 0), a), (('ior', a, True), True), - (('fxor', a, a), 0.0), (('ixor', a, a), 0), (('ixor', a, 0), a), (('inot', ('inot', a)), a), |