VarAction2: Ensure dead store elimination doesn't break variable 0x7B

This commit is contained in:
Jonathan G Rennison
2022-06-03 19:13:07 +01:00
parent 813146a78f
commit 6a17f00a27

View File

@@ -6382,7 +6382,7 @@ static void HandleVarAction2DeadStoreElimination()
/* Redundant store */ /* Redundant store */
group->adjusts.erase(group->adjusts.begin() + i); group->adjusts.erase(group->adjusts.begin() + i);
i--; i--;
if ((i + 1 < (int)group->adjusts.size() && group->adjusts[i + 1].operation == DSGA_OP_RST) || if ((i + 1 < (int)group->adjusts.size() && group->adjusts[i + 1].operation == DSGA_OP_RST && group->adjusts[i + 1].variable != 0x7B) ||
(i + 1 == (int)group->adjusts.size() && group->ranges.empty() && !group->calculated_result)) { (i + 1 == (int)group->adjusts.size() && group->ranges.empty() && !group->calculated_result)) {
/* Now the store is eliminated, the current value has no users */ /* Now the store is eliminated, the current value has no users */
while (i >= 0) { while (i >= 0) {