-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[AMDGPU] Don't create mulhi_24 in CGP #72983
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 all 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 |
---|---|---|
|
@@ -862,6 +862,17 @@ def : divergent_i64_BinOp <and, V_AND_B32_e64>; | |
def : divergent_i64_BinOp <or, V_OR_B32_e64>; | ||
def : divergent_i64_BinOp <xor, V_XOR_B32_e64>; | ||
|
||
// mul24 w/ 64 bit output. | ||
class mul24_64_Pat<SDPatternOperator Op, Instruction InstLo, Instruction InstHi> : GCNPat< | ||
(i64 (Op i32:$src0, i32:$src1)), | ||
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. I think you might be better off breaking this up in lowering. 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. The point of this patch is that patterns should only ever have to match cc @jayfoad |
||
(REG_SEQUENCE VReg_64, | ||
(InstLo $src0, $src1), sub0, | ||
(InstHi $src0, $src1), sub1) | ||
>; | ||
|
||
def : mul24_64_Pat<AMDGPUmul_i24, V_MUL_I32_I24_e64, V_MUL_HI_I32_I24_e64>; | ||
def : mul24_64_Pat<AMDGPUmul_u24, V_MUL_U32_U24_e64, V_MUL_HI_U32_U24_e64>; | ||
|
||
//===----------------------------------------------------------------------===// | ||
// 16-Bit Operand Instructions | ||
//===----------------------------------------------------------------------===// | ||
|
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.
Do we not try to form freestanding mulhi_24?
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.
It doesn't look like we do, at least i haven't seen a case of that in tests.
Should we match a shift and create a mulhi? If so I can look into that in a follow-up patch
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.
Probably should, not sure it will ever happen in practice