From: Chris Forbes Date: Sun, 26 Jul 2020 03:11:11 +0000 (-0700) Subject: bifrost: Lower x->bool conversions to != 0 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ffefad7916969b4de24aa14140f5e40d0cec58a;p=mesa.git bifrost: Lower x->bool conversions to != 0 Signed-off-by: Chris Forbes Reviewed-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_nir_algebraic.py b/src/panfrost/bifrost/bifrost_nir_algebraic.py index 5e2c65c68ac..d28c82d401a 100644 --- a/src/panfrost/bifrost/bifrost_nir_algebraic.py +++ b/src/panfrost/bifrost/bifrost_nir_algebraic.py @@ -86,6 +86,9 @@ SPECIAL = ['fexp2', 'flog2', 'fsin', 'fcos'] for op in SPECIAL: converts += [((op + '@16', a), ('f2f16', (op, ('f2f32', a))))] +converts += [(('f2b32', a), ('fne32', a, 0.0)), + (('i2b32', a), ('ine32', a, 0))] + def main(): parser = argparse.ArgumentParser() parser.add_argument('-p', '--import-path', required=True)