[PATCH] D155867: [AMDGPU][GlobalISel] Fix applyMappingImpl function for G_ABS and type v2s16
Petar Avramovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 24 03:16:03 PDT 2023
Petar.Avramovic added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.abs.vector.ll:292-293
+; GFX10: ; %bb.0:
+; GFX10-NEXT: v_pk_sub_i16 v3, 0, v2
+; GFX10-NEXT: v_pk_max_i16 v2, v2, v3
+; GFX10-NEXT: global_store_dword v[0:1], v2, off
----------------
arsenm wrote:
> Why is it legal if there's no vector abs? RegBankSelect doesn't need to consider always illegal operations
Lowering is different
sgpr: unpack v2i16, 2 x abs_i32, pack to v2i16
vgpr: use v_pk sub and max
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155867/new/
https://reviews.llvm.org/D155867
More information about the llvm-commits
mailing list