-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
[X86] mulhu + srl pattern not recognized #132166
Comments
@llvm/issue-subscribers-backend-x86 Author: Nikita Popov (nikic)
https://llvm.godbolt.org/z/9Khd9Gdhh
```llvm
define <8 x i16> @mul_and_shift16(<8 x i16> %a, <8 x i16> %b) {
%a.ext = zext <8 x i16> %a to <8 x i32>
%b.ext = zext <8 x i16> %b to <8 x i32>
%mul = mul <8 x i32> %a.ext, %b.ext
%shift = lshr <8 x i32> %mul, splat(i32 16)
%trunc = trunc <8 x i32> %shift to <8 x i16>
ret <8 x i16> %trunc
}
define <8 x i16> @mul_and_shift17(<8 x i16> %a, <8 x i16> %b) {
mul_and_shift16: # @mul_and_shift16
|
@abhishek-kaushik22 if you're looking at this - combineShiftToPMULH just needs adjusting to look for |
https://llvm.godbolt.org/z/9Khd9Gdhh
Results in:
The second one could be just pmulhuw + psrlw.
The text was updated successfully, but these errors were encountered: