This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GISel] Constrain selected operands in selectG_BUILD_VECTOR
ClosedPublic

Authored by Pierre-vh on Oct 19 2022, 2:01 AM.

Details

Summary

Small bugfix. Currently harmless but a case in D134354 triggers it.

Diff Detail

Event Timeline

Pierre-vh created this revision.Oct 19 2022, 2:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 2:01 AM
Pierre-vh requested review of this revision.Oct 19 2022, 2:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 19 2022, 2:01 AM
arsenm accepted this revision.Oct 19 2022, 8:04 AM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
692

Should be able to get away with just src0

This revision is now accepted and ready to land.Oct 19 2022, 8:04 AM
Pierre-vh added inline comments.Oct 19 2022, 11:36 PM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
692

Do you mean calling constrainOperandRegClass directly?
If possible I'd rather keep constrainSelectedInstRegOperands. We're doing the same operation in both cases (we want the operands to be constrained to the instruction's desired RB) and I feel like it's easier to follow if we just use the same function in both cases