Skip to content
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

Combine and-mask+icmp eq -> icmp ule when mask was all-ones in high bits #38139

Closed
LebedevRI opened this issue Aug 31, 2018 · 2 comments
Closed
Labels

Comments

@LebedevRI
Copy link
Member

Bugzilla Link 38791
Version trunk
OS Linux
CC @davidbolvansky

Extended Description

Copied from #37471

Name: range using high bits
%masked = or i8 %arg, 192
%r = icmp ne i8 %masked, %arg
=>
%r = icmp ult i8 %arg, 192

https://rise4fun.com/Alive/lv5

@davidbolvansky
Copy link
Collaborator

Also
%masked = or i8 %arg, 192
%r = icmp eq i8 %masked, %arg
=>
%r = icmp uge i8 %arg, 192

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 10, 2021
RKSimon added a commit that referenced this issue Jun 11, 2024
@RKSimon
Copy link
Collaborator

RKSimon commented Jun 11, 2024

Missing fold was fixed by 3cf54c5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants