On GFX10 VOP3 instructions can have a literal operand, so the conversion
from VOP3 MAD/FMA to VOP2 MADAK/MADMK/FMAAK/FMAMK will not happen in
SIFoldOperands. The only benefit of the VOP2 form is code size, so do it
in SIShrinkInstructions instead.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | ||
---|---|---|
399 | Oh, I see. Ignore this comment. |
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | ||
---|---|---|
348 | No, it was intentional, but I agree it looked a bit strange. I have changed it. |
Prefer not to swap operands when possible, for efficiency and to make
some before/after code comparisons easier.
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | ||
---|---|---|
394 | Can use .add on the usual BuildMI chain |
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | ||
---|---|---|
809 | Are you going to do this in a separate change? |
llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp | ||
---|---|---|
809 | Sure, can do, but there are no in-tree tests for it, and no use for it in the graphics shaders I've been looking at either. |
A leftover?