aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
-rw-r--r--simplify.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/simplify.c b/simplify.c
index d729b390..0d9391e2 100644
--- a/simplify.c
+++ b/simplify.c
@@ -53,6 +53,15 @@
// ^^^^^^^^^
///
+// check if a pseudo is a power of 2
+static inline bool is_pow2(pseudo_t src)
+{
+ if (src->type != PSEUDO_VAL)
+ return false;
+ return is_power_of_2(src->value);
+}
+
+///
// find the trivial parent for a phi-source
static struct basic_block *phi_parent(struct basic_block *source, pseudo_t pseudo)
{