summaryrefslogtreecommitdiff
path: root/src/ir/block-utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir/block-utils.h')
-rw-r--r--src/ir/block-utils.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ir/block-utils.h b/src/ir/block-utils.h
index d3a4e0a64..f8224186f 100644
--- a/src/ir/block-utils.h
+++ b/src/ir/block-utils.h
@@ -37,8 +37,10 @@ simplifyToContents(Block* block, T* parent, bool allowTypeChange = false) {
!BranchUtils::BranchSeeker::has(list[0], block->name)) {
// just one element. try to replace the block
auto* singleton = list[0];
- auto sideEffects =
- EffectAnalyzer(parent->getPassOptions(), singleton).hasSideEffects();
+ auto sideEffects = EffectAnalyzer(parent->getPassOptions(),
+ parent->getModule()->features,
+ singleton)
+ .hasSideEffects();
if (!sideEffects && !singleton->type.isConcrete()) {
// no side effects, and singleton is not returning a value, so we can
// throw away the block and its contents, basically