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] Param attributes should be swapped/dropped after swapping operands of commutative intrinsics #115890

Open
dtcxzyw opened this issue Nov 12, 2024 · 0 comments · May be fixed by #115988

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Nov 12, 2024

; bin/opt -passes=instcombine test.ll -S
define i32 @test(i32 %x) {
  %ret = call range(i32 -10, 0) i32 @llvm.umax.i32(i32 range(i32 -10, -8) -10, i32 %x)
  ret i32 %ret
}
define i32 @test(i32 %x) {
  %ret = call range(i32 -10, 0) i32 @llvm.umax.i32(i32 range(i32 -10, -8) %x, i32 -10)
  ret i32 %ret
}

I found this with https://github.com/dtcxzyw/llvm-ub-aware-interpreter.

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