removing wrong graph query in a peephole

This commit is contained in:
Jakub Doka 2024-11-07 10:47:31 +01:00
parent 2718ef8523
commit be6d0d3f18
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -1188,8 +1188,11 @@ impl Nodes {
return Some(prev_store);
}
if value != VOID
&& self[target].inputs.len() == 4
if let Some(&load) =
self[target].outputs.iter().find(|&&n| self[n].kind == Kind::Load)
{
self[load].peep_triggers.push(target);
} else if value != VOID
&& self[value].kind != Kind::Load
&& self[store].kind == Kind::Stre
&& self[store].inputs[2] == region