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

[InstCombine] samesign flag should be dropped #112356

Closed
dtcxzyw opened this issue Oct 15, 2024 · 0 comments · Fixed by #112358
Closed

[InstCombine] samesign flag should be dropped #112356

dtcxzyw opened this issue Oct 15, 2024 · 0 comments · Fixed by #112358

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Oct 15, 2024

Reproducer:

define i1 @src(i32 %In) {
  %c1 = icmp samesign sgt i32 %In, -1
  %c2 = icmp samesign eq i32 %In, 1
  %V = select i1 %c1, i1 %c2, i1 false
  ret i1 %V
}

define i1 @tgt(i32 %In) {
  %c2 = icmp samesign eq i32 %In, 1
  ret i1 %c2
}

We should check this flag in Operator::hasPoisonGeneratingFlags.

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.

1 participant