summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2019-09-04 16:24:27 -0700
committerDylan Baker <dylan@pnwbakers.com>2019-09-04 16:25:49 -0700
commitb84cbdfd4da9607100e5a6ae0d2fc0ee707953b2 (patch)
tree455d098a476c9d4cd8f1e15460ffa1faa6840af0
parentf180b04d65b48ff9c90b9cc1610730a3ac3efd1d (diff)
downloadmesa-b84cbdfd4da9607100e5a6ae0d2fc0ee707953b2.tar.gz
nir: Add is_not_negative helper function
This was taken from 636da1243346e4e2a5aaf79bac65850884a9b859, and is needed by the next patch.
-rw-r--r--src/compiler/nir/nir_range_analysis.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_range_analysis.c b/src/compiler/nir/nir_range_analysis.c
index 6dfaea167ac..28ed8ac846e 100644
--- a/src/compiler/nir/nir_range_analysis.c
+++ b/src/compiler/nir/nir_range_analysis.c
@@ -31,6 +31,12 @@
* the result.
*/
+static bool
+is_not_negative(enum ssa_ranges r)
+{
+ return r == gt_zero || r == ge_zero || r == eq_zero;
+}
+
static void *
pack_data(const struct ssa_result_range r)
{