Skip to content

[ConstraintElim] Y -nsw X s> NonNeg implies Y s> X #118211

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

Closed
dtcxzyw opened this issue Dec 1, 2024 · 0 comments · Fixed by #118219
Closed

[ConstraintElim] Y -nsw X s> NonNeg implies Y s> X #118211

dtcxzyw opened this issue Dec 1, 2024 · 0 comments · Fixed by #118219

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Dec 1, 2024

Alive2: https://alive2.llvm.org/ce/z/H7v8VG

define i1 @src(i32 %x, i32 %y, i32 range(i32 0, -2147483648) %z) {
entry:
  %sub = sub nsw i32 %y, %x
  %cond = icmp sgt i32 %sub, %z
  call void @llvm.assume(i1 %cond)
  %ret = icmp slt i32 %x, %y
  ret i1 %ret
}

define i1 @tgt(i32 %x, i32 %y, i32 %z) {
entry:
  ret i1 true
}

See dtcxzyw/llvm-tools#57

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