-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[KnownBits] (Trunc X) != 1
implies X != 1
#118104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
More tests:
Blocked by #112742 |
I hade found the assume( trunc x to i1) when trying to solve some regressions that I hade for an other commit so pushed up that PR but if you have a better solution I can abandon it. I hade not seen the icmp (trunc x ne 1) but looks like it is not KnownBits as all we know is that x is not 1. maybe can hadle trunc in llvm-project/llvm/lib/Analysis/ValueTracking.cpp Line 9259 in 4a07433
|
Actually this issue is not related to
We can infer the LSB is 1 or 0, no? I have a local patch which modifies |
Hmm I thought that we can not say anything about the known bits for
as the LSB is for eg 1 for %x = 3 but 0 for %x = 2 and the %cond is true for both or maybe I'm missing something. |
I know what you are saying. But it is not the motivation of this issue. This issue only focuses on eliminating a common pattern in Rust applications (i.e., For |
Alive2: https://alive2.llvm.org/ce/z/3yxP4T
The second pattern is common in Rust applications. See also dtcxzyw/llvm-tools#36.
The text was updated successfully, but these errors were encountered: