-
Notifications
You must be signed in to change notification settings - Fork 15.1k
[AMDGPU] support 64-bit immediates in SIInstrInfo::FoldImmediate #69260
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 |
|---|---|---|
|
|
@@ -151,6 +151,7 @@ def S_MOV_B64_IMM_PSEUDO : SPseudoInstSI <(outs SReg_64:$sdst), | |
| let SchedRW = [WriteSALU, Write64Bit]; | ||
| let Size = 16; // Needs maximum 2 s_mov_b32 instructions 8 byte long each. | ||
| let Uses = []; | ||
| let UseNamedOperandTable = 1; | ||
|
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. What is this for? 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. This was missing, and we are querying names operand src0 while folding. 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. Makes sense, thanks. I did not even know there was a flag for this. I thought it happened automatically. |
||
| } | ||
|
|
||
| // Pseudoinstruction for @llvm.amdgcn.wqm. It is turned into a copy after the | ||
|
|
||
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.
Nit: seems over-engineered to use
APInt. Simpler and faster to return(int16_t)(Imm >> 48).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 is not a same value though? The cast to int16_t will truncate it?
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.
int16_t is signed so the implicit conversion to the return type will sign extend it.