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] Commuted pattern is not handled #121775

Open
dtcxzyw opened this issue Jan 6, 2025 · 0 comments
Open

[InstCombine] Commuted pattern is not handled #121775

dtcxzyw opened this issue Jan 6, 2025 · 0 comments

Comments

@dtcxzyw
Copy link
Member

dtcxzyw commented Jan 6, 2025

https://godbolt.org/z/KTbTov4rb

define i8 @or_lshr1(i8 %x, i8 %y, i8 %z, i8 %shamt) {
  %sx = lshr i8 %x, %shamt
  %sy = lshr i8 %y, %shamt
  %a = or i8 %sx, %z
  %r = or i8 %sy, %a
  ret i8 %r
}

define i8 @or_lshr2(i8 %x, i8 %y, i8 %z, i8 %shamt) {
  %sx = lshr i8 %x, %shamt
  %sy = lshr i8 %y, %shamt
  %a = or i8 %z, %sx
  %r = or i8 %sy, %a
  ret i8 %r
}
define i8 @or_lshr1(i8 %x, i8 %y, i8 %z, i8 %shamt) {
  %1 = or i8 %x, %y
  %2 = lshr i8 %1, %shamt
  %r = or i8 %2, %z
  ret i8 %r
}

define i8 @or_lshr2(i8 %x, i8 %y, i8 %z, i8 %shamt) {
  %sx = lshr i8 %x, %shamt
  %sy = lshr i8 %y, %shamt
  %a = or i8 %z, %sx
  %r = or i8 %sy, %a
  ret i8 %r
}
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