[PATCH] D92219: [AMDGPU][GlobalISel] Avoid selecting S_PACK with constants

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 09:37:19 PST 2020


arsenm added a comment.

In D92219#2420126 <https://reviews.llvm.org/D92219#2420126>, @foad wrote:

>> Specific case from one of the tests:
>>
>>   %5:sgpr(s16) = G_FCONSTANT half 0xH4000
>>   %7:sgpr(s32) = G_ANYEXT %5:sgpr(s16)
>>   %4:sreg_32(<2 x s16>) = G_BUILD_VECTOR_TRUNC %7:sgpr(s32), %7:sgpr(s32)
>
> Perhaps there should be a combine that simplifies this to G_BUILD_VECTOR %5, %5.

This is specifically avoiding 16-bit inputs, we expanded the other direction. It could be a bitcast of a scalar constant. I'm trying a somewhat different strategy for 16-bit vectors than the DAG but not sure what the end state is going to look like


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

https://reviews.llvm.org/D92219



More information about the llvm-commits mailing list