[PATCH] D106830: GlobalISel: Have load lowering handle some unaligned accesses
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 26 14:25:47 PDT 2021
arsenm created this revision.
arsenm added reviewers: aemerson, paquette, dsanders, bogner, aditya_nandakumar.
Herald added subscribers: kerbowa, hiraditya, tpr, rovka, nhaehnle, jvesely.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
The code for splitting an unaligned access into 2 pieces is
essentially the same as for splitting a non-power-of-2 load for
scalars. It would be better to pick an optimal memory access size and
directly use it, but splitting in half is what the DAG does.
As-is this fixes handling of some unaligned sextload/zextloads for
AMDGPU. In the future this will help drop the ugly abuse of
narrowScalar to handle splitting unaligned accesses.
https://reviews.llvm.org/D106830
Files:
llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sextload-global.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-zextload-global.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106830.361804.patch
Type: text/x-patch
Size: 7342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210726/e426c096/attachment.bin>
More information about the llvm-commits
mailing list