Fix some egraph-related issues. (#5088)
This fixes #5086 by addressing two separate issues: - The `ValueDataPacked::set_type()` helper had an embarrassing bitfield-manipulation bug that would mangle the rest of a `ValueDef` when setting its type. This is not normally used, only when the egraph elaboration fills in types after-the-fact on a multi-value node. - The lowering rules for `isplit` on aarch64 and s390x were dispatching on the first output type, rather than the input type. When only the second output is used (as in the example in #5086), the first output type actually remains `INVALID` (and this is fine because it's never used).
This commit is contained in:
@@ -523,7 +523,7 @@ impl ValueDataPacked {
|
||||
|
||||
#[inline(always)]
|
||||
fn set_type(&mut self, ty: Type) {
|
||||
self.0 &= !((1 << Self::TYPE_BITS) - 1) << Self::TYPE_SHIFT;
|
||||
self.0 &= !(((1 << Self::TYPE_BITS) - 1) << Self::TYPE_SHIFT);
|
||||
self.0 |= (ty.repr() as u64) << Self::TYPE_SHIFT;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user