Skip to content

Commit 0e766c9

Browse files
tekknolagik0kubun
authored andcommitted
Mark Guard* as depending on Snapshot in DCE
We need to keep the Snapshot instruction alive.
1 parent 392c492 commit 0e766c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

zjit/src/hir.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,12 +1198,15 @@ impl Function {
11981198
Insn::StringCopy { val }
11991199
| Insn::ArrayDup { val }
12001200
| Insn::StringIntern { val }
1201-
| Insn::GuardType { val, .. }
1202-
| Insn::GuardBitEquals { val, .. }
12031201
| Insn::Return { val }
12041202
| Insn::Defined { v: val, .. }
12051203
| Insn::Test { val } =>
12061204
worklist.push_back(val),
1205+
Insn::GuardType { val, state, .. }
1206+
| Insn::GuardBitEquals { val, state, .. } => {
1207+
worklist.push_back(val);
1208+
worklist.push_back(state);
1209+
}
12071210
Insn::ArraySet { array, val, .. } => {
12081211
worklist.push_back(array);
12091212
worklist.push_back(val);

0 commit comments

Comments
 (0)