When atomic image intrinsic return value is unused, register class for
destination of a sub-register copy of return value ends up not being set.
This copy then hits 'Register class not set' assert later.
If return value has uses, register class is determined by use instruction.
Fix is to not create sub-register copy when image intrinsic destination has
no uses because it would be deleted by dead-mi-elimination later anyway.
Details
Details
Diff Detail
Diff Detail
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
2,440 ms | x64 debian > libarcher.races::task-two.c |
Event Timeline
Comment Actions
LGTM. Letting the case where we do need the copy rely on the user constraining it is a bit iffy though
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp | ||
---|---|---|
1651–1652 | In principle this would need the result register to be constrained anyway |
In principle this would need the result register to be constrained anyway