Skip to content

Failure to infer %arg is a constant #85559

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

Open
dianqk opened this issue Mar 17, 2024 · 0 comments
Open

Failure to infer %arg is a constant #85559

dianqk opened this issue Mar 17, 2024 · 0 comments

Comments

@dianqk
Copy link
Member

dianqk commented Mar 17, 2024

I tried the following code:

define i64 @src(i64 noundef %arg) {
bb:
  switch i64 %arg, label %bb1 [
    i64 0, label %bb2
    i64 1, label %bb1
  ]

bb1:
  unreachable

bb2:
  ret i64 %arg
}

define i64 @tgt(i64 noundef %arg) {
bb:
  ret i64 0
}

We can know that %arg is zero.

alive2: https://alive2.llvm.org/ce/z/iqgz5F

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

No branches or pull requests

1 participant