S_GETREG is to read hardware registers.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
SC has some prettier syntax for the values being read, but that can be a separate patch
include/llvm/IR/IntrinsicsAMDGPU.td | ||
---|---|---|
221 | This needs to be read only. In special cases the call site can be marked readnone | |
lib/Target/AMDGPU/SIInstructions.td | ||
2076 | You should be able to put this in the instruction definition |
Comment Actions
Update based on Matt's Comments:
- Use "read only" attribute for s_getreg intrinsic;
- Decided to use separate Pattern for the intrinsic temporarily.
Comment Actions
update based on Matt's Comments
- Create a new SOPK_32 multicalss, and rename the original one as SOPK_16 (so both are based on operand size);
- Move the intrinsic s_getreg_b32 pattern inside the instruction definition;
- Add checks for SI and CI devices in the test.
You should be able to put this in the instruction definition