-
Notifications
You must be signed in to change notification settings - Fork 15.4k
[X86] Generate vpmuludq instead of vpmullq
#121456
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 | ||
| ; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx512dq -O3 | FileCheck %s | ||
abhishek-kaushik22 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| define <8 x i64> @pr121456(<8 x i64> %a, <8 x i64> %b) { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't name the test file after a pull request - "pr" is the old llvm term for problem report - the number should be based off a reported issue number (is there one?) - otherwise I'd probably suggest adding these tests to combine-pmuldq.ll instead |
||
| ; CHECK-LABEL: pr121456: | ||
| ; CHECK: # %bb.0: # %entry | ||
| ; CHECK-NEXT: vpmuludq %zmm0, %zmm1, %zmm0 | ||
| ; CHECK-NEXT: vpsllq $32, %zmm0, %zmm0 | ||
| ; CHECK-NEXT: retq | ||
| entry: | ||
| %0 = and <8 x i64> %a, splat (i64 4294967295) | ||
| %1 = and <8 x i64> %b, splat (i64 4294967295) | ||
| %2 = mul nuw <8 x i64> %1, %0 | ||
| %3 = bitcast <8 x i64> %2 to <16 x i32> | ||
| %4 = shufflevector <16 x i32> <i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison, i32 0, i32 poison>, <16 x i32> %3, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30> | ||
| %5 = bitcast <16 x i32> %4 to <8 x i64> | ||
| ret <8 x i64> %5 | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this be happening for v2i64/v4i64 as well on avx512dq targets? Please can you add test coverage for those as well. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't going to work in the general case, it will just help shuffles:
https://llvm.godbolt.org/z/no1Gc6fzT