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

add nuw i1 should simplify to or disjoint i1 (not to xor i1) #118164

Open
scottmcm opened this issue Nov 30, 2024 · 0 comments · May be fixed by #118221
Open

add nuw i1 should simplify to or disjoint i1 (not to xor i1) #118164

scottmcm opened this issue Nov 30, 2024 · 0 comments · May be fixed by #118221

Comments

@scottmcm
Copy link

Today, add nuw i1 optimizes to xor i1: https://llvm.godbolt.org/z/n5fY4x8Gx

That loses information, though. It could instead optimize to or disjoint i1 (https://alive2.llvm.org/ce/z/PUwk-C), to preserve the fact that it can't be true + true.

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

Successfully merging a pull request may close this issue.

2 participants