[PATCH] D99565: [X86] Support replacing aligned vector moves with unaligned moves when avx is enabled.
LiuChen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 30 01:34:24 PDT 2021
LiuChen3 added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:1642
+ Group<f_Group>, Flags<[CoreOption, HelpHidden]>,
+ HelpText<"Enable transforming aligned vector move instruction to "
+ "unaligned vector move.">;
----------------
craig.topper wrote:
> As far the user is concerned this isn’t a transform. From their perspective it’s always use unaligned move instructions.
How about "Always emit unaligned move instructions." ? Do you have any suggestion here?
================
Comment at: llvm/lib/Target/X86/X86MCInstLower.cpp:2708
+ // enabled.
+ if (EnableX86UnalignedVecMove) {
+ for (const auto Pair : AlignedMovToUnalignedMovTable) {
----------------
Forgot to check the SSE level. I will add in next patch.
================
Comment at: llvm/test/CodeGen/X86/avx512vl-unaligned-load-store.ll:6
+define <8 x i32> @test_256_1(i8 * %addr) {
+; CHECK-LABEL: test_256_1:
+; CHECK: # %bb.0:
----------------
craig.topper wrote:
> CHECK isn’t a valid prefix for this file
Thanks for reminding. I forgot to delete the these. I will remove these in next patch.
================
Comment at: llvm/test/CodeGen/X86/avx512vl-unaligned-load-store.ll:21
+ %vaddr = bitcast i8* %addr to <8 x i32>*
+ %res = load <8 x i32>, <8 x i32>* %vaddr, align 1
+ ret <8 x i32>%res
----------------
craig.topper wrote:
> What are the tests with align 1 intended to show?
This is to distinguish the unaligned-mov converted from aligned-move and the original unaligned-move. See the difference between line12 and line28.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99565/new/
https://reviews.llvm.org/D99565
More information about the llvm-commits
mailing list