Cranelift: Rewrite or(and(x, y), not(y)) => or(x, not(y)) again (#5684)
This rewrite was introduced in #5676 and then reverted in #5682 due to a footgun
where we accidentally weren't actually checking the `y == !z` precondition. This
commit fixes the precondition check. It also fixes the arithmetic to be
correctly masked to the value type's width.
This reverts commit 268f6bfc1d.
This commit is contained in:
@@ -109,6 +109,11 @@ macro_rules! isle_common_prelude_methods {
|
||||
!x
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn u64_eq(&mut self, x: u64, y: u64) -> bool {
|
||||
x == y
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn u64_is_zero(&mut self, value: u64) -> bool {
|
||||
0 == value
|
||||
|
||||
Reference in New Issue
Block a user