This allows to convert the add instruction to s_addk_i32 and
v_add_nc_u32 instead of needing v_add_co_u32 when converting to a VALU
instruction.
Details
- Reviewers
arsenm rampitec - Commits
- rG96e1fcb1e005: [AMDGPU] Use s_add_i32 for address additions
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This allows to convert the add instruction to s_addk_i32
Nice. (But perhaps we should be able to convert s_add_u32 -> s_addk_i32 if scc is dead?)
and v_add_nc_u32 instead of needing v_add_co_u32 when converting to a VALU instruction.
None of the tests show this. Why is it better? Just because it does not clobber vcc?
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
311 | Matt usually objects to this extra indentation on the grounds that clang-format is wrong. | |
1297–1302 | *=? |
This allows to convert the add instruction to s_addk_i32
Nice. (But perhaps we should be able to convert s_add_u32 -> s_addk_i32 if scc is dead?)
That would be nice, but how can I find out if SCC is unused? The dead flag is unreliable (at least for GlobalISel it is not set when the ShrinkInstructions pass is run. In some review Matt suggested that should remove the flag altogether).
and v_add_nc_u32 instead of needing v_add_co_u32 when converting to a VALU instruction.
None of the tests show this. Why is it better? Just because it does not clobber vcc?
I hoped it could save a register, but you’re right, it doesn’t change anything.
Matt usually objects to this extra indentation on the grounds that clang-format is wrong.