[PATCH] D64845: [GlobalISel] Check LLT size matches memory size for non-truncating stores.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 19:07:40 PDT 2019
arsenm added inline comments.
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-flat.mir:106
; GFX9: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
- ; GFX9: FLAT_STORE_BYTE [[COPY]], [[COPY1]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (store 1)
+ ; GFX9: FLAT_STORE_DWORD [[COPY]], [[COPY1]], 0, 0, 0, 0, implicit $exec, implicit $flat_scr
; GFX10-LABEL: name: store_flat_s32_to_1
----------------
This is breaking this, producing a non-truncating store instead of the correct trunc store
================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-store-private.mir:55
+ ; GFX6: [[COPY1:%[0-9]+]]:vgpr(p5) = COPY $vgpr1
+ ; GFX6: G_STORE [[COPY]](s32), [[COPY1]](p5) :: (store 2, addrspace 5)
; GFX9-LABEL: name: store_private_s32_to_2
----------------
This is breaking this, the correct trunc store now fails to select
================
Comment at: llvm/utils/TableGen/GlobalISelEmitter.cpp:3314
+ InsnMatcher.addPredicate<MemoryVsLLTSizePredicateMatcher>(
+ 0, MemoryVsLLTSizePredicateMatcher::EqualTo, 0);
+ }
----------------
Should also continue? Could make this a select on the match type to the one addPredicate call
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64845/new/
https://reviews.llvm.org/D64845
More information about the llvm-commits
mailing list