We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bb5e46 commit 96662e4Copy full SHA for 96662e4
cranelift/codegen/src/egraph/elaborate.rs
@@ -337,8 +337,10 @@ impl<'a> Elaborator<'a> {
337
" -> best of union({:?}, {:?}) = {:?}",
338
best[x], best[y], best[value]
339
);
340
- let not_chosen = if best[value] == best[x] { y } else { x };
341
- Self::mark_not_chosen(&mut self.not_chosen, &self.func.dfg, not_chosen);
+ if best[x].0 != best[y].0 {
+ let not_chosen = if best[value] == best[x] { y } else { x };
342
+ Self::mark_not_chosen(&mut self.not_chosen, &self.func.dfg, not_chosen);
343
+ }
344
}
345
346
ValueDef::Param(_, _) => {
0 commit comments