[PATCH] D92219: [AMDGPU][GlobalISel] Avoid selecting S_PACK with constants
Mirko Brkusanin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 27 05:26:21 PST 2020
mbrkusanin updated this revision to Diff 308027.
mbrkusanin retitled this revision from "[AMDGPU] Constant fold S_PACK instructions" to "[AMDGPU][GlobalISel] Avoid selecting S_PACK with constants".
mbrkusanin edited the summary of this revision.
mbrkusanin added a comment.
Herald added a subscriber: rovka.
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)
will now be:
%4:sreg_32 = S_MOV_B32 1073758208
instead of:
%5:sreg_32 = S_MOV_B32 16384
%4:sreg_32 = S_PACK_LL_B32_B16 %5:sreg_32, %5:sreg_32
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92219/new/
https://reviews.llvm.org/D92219
Files:
llvm/include/llvm/CodeGen/GlobalISel/Utils.h
llvm/lib/CodeGen/GlobalISel/Utils.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-build-vector-trunc.v2s16.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.fdot2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92219.308027.patch
Type: text/x-patch
Size: 6214 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201127/6b65517b/attachment.bin>
More information about the llvm-commits
mailing list