You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar problems associated with the fold zext(a < 0) => lshr a, BW-1 have happened many times. For bit-level operations, the latter would be better. Conversely, for logical operations, the former would be better. I don't know which one is better and how to generalize it. But to solve similar problems with current canonicalization, we must consider a << (BW-1) when we fold operation with other (hidden) icmp.
What can we do if we don't want reduntant similar work? My 2c here is, if when we use pattern match, we can match a whole equivalent class like a < 0, a << BW - 1, then we can solve similar problems completely. That's a theoretical solution from my individual view and it's a systematic work (may change architecture) in need of other's approval and efforts.
https://godbolt.org/z/evaE94d7o
https://alive2.llvm.org/ce/z/6ra3nj
The text was updated successfully, but these errors were encountered: