[PATCH] D103322: [AMDGPU] Use s_add_i32 for address additions

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 10:05:18 PDT 2021


sebastian-ne added a comment.

>> 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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103322/new/

https://reviews.llvm.org/D103322



More information about the llvm-commits mailing list