summaryrefslogtreecommitdiff
path: root/src/ast_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_utils.h')
-rw-r--r--src/ast_utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ast_utils.h b/src/ast_utils.h
index 36895ac51..5cda48578 100644
--- a/src/ast_utils.h
+++ b/src/ast_utils.h
@@ -52,7 +52,7 @@ struct EffectAnalyzer : public PostWalker<EffectAnalyzer, Visitor<EffectAnalyzer
bool accessesLocal() { return localsRead.size() + localsWritten.size() > 0; }
bool accessesMemory() { return calls || readsMemory || writesMemory; }
- bool hasSideEffects() { return calls || localsWritten.size() > 0 || writesMemory; }
+ bool hasSideEffects() { return calls || localsWritten.size() > 0 || writesMemory || branches; }
bool hasAnything() { return branches || calls || accessesLocal() || readsMemory || writesMemory; }
// checks if these effects would invalidate another set (e.g., if we write, we invalidate someone that reads, they can't be moved past us)