[PATCH] D98515: [AMDGPU][GlobalISel] Stop foldInsertEltToCmpSelect from changing reg banks

Mirko Brkusanin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 03:42:12 PDT 2021


mbrkusanin updated this revision to Diff 334395.
mbrkusanin added a comment.

The issue is in G_AMDGPU_S_BUFFER_LOAD where first we select sgpr for %4. However when selecting a bank for G_INSERT_VECTOR_ELT then foldInsertEltToCmpSelect will change it to vgpr and instruction-select will fail later on.

This can also be seen in other tests like insert_vector_elt_v4i32_v_s_s 
where before the patch we had:
%1:vgpr(s32) = COPY $sgpr0
and now it is:
%1:sgpr(s32) = COPY $sgpr0
but this does not bother instruction-select.


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

https://reviews.llvm.org/D98515

Files:
  llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i8.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-insert-vector-elt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98515.334395.patch
Type: text/x-patch
Size: 31638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210331/e751cce0/attachment.bin>


More information about the llvm-commits mailing list