summaryrefslogtreecommitdiff
path: root/src/passes/PickLoadSigns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/PickLoadSigns.cpp')
-rw-r--r--src/passes/PickLoadSigns.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/passes/PickLoadSigns.cpp b/src/passes/PickLoadSigns.cpp
index 6ead0cc4e..d7947960c 100644
--- a/src/passes/PickLoadSigns.cpp
+++ b/src/passes/PickLoadSigns.cpp
@@ -94,6 +94,10 @@ struct PickLoadSigns : public WalkerPass<ExpressionStackWalker<PickLoadSigns>> {
}
void visitSetLocal(SetLocal* curr) {
+ if (curr->isTee()) {
+ // we can't modify a tee, the value is used elsewhere
+ return;
+ }
if (auto* load = curr->value->dynCast<Load>()) {
loads[load] = curr->index;
}