This looked through copies to find the source modifiers, which may
have been SGPR->VGPR copies added to avoid potential constant bus
violations. Re-insert a copy to a VGPR if this happens.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM, modulo a question.
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s32.mir | ||
---|---|---|
168–169 | The COPY isn't needed in this case. Which pass is responsible for cleaning that up again, and how do you envision that working in the long term? Is that a GICombine thing? |
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-fadd.s32.mir | ||
---|---|---|
168–169 | SIFoldOperands, or a rewrite of it should take care of this. Right now it's too stupid to handle folding multiple operands at a time, so it does a poor job cleaning it up. In the DAG we start out with incorrect MIR and fix it, so we have more SGPR operands to begin with |
The COPY isn't needed in this case. Which pass is responsible for cleaning that up again, and how do you envision that working in the long term? Is that a GICombine thing?