[PATCH] D21935: Add TLI.allowsMisalignedMemoryAccesses to LoadStoreVectorizer

Alina Sbirlea via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 13:44:45 PDT 2016


asbirlea added inline comments.

================
Comment at: lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:700
@@ +699,3 @@
+  // TODO: Remove TargetBaseAlign
+  if (allowsMisalignedAndIsFast(SzInBytes, AS, Alignment) == false &&
+      (Alignment % SzInBytes) != 0 && (Alignment % TargetBaseAlign) != 0) {
----------------
Updated this with new condition. Now there are other tests that vectorize, the ones with "natural" alignment that I had updated previously. I'm looking into whether this is correct behavior.

================
Comment at: test/Transforms/LoadStoreVectorizer/AMDGPU/merge-stores.ll:505
@@ -504,4 +504,3 @@
 ; CHECK-LABEL: @merge_local_store_2_constants_i32_align_2
-; CHECK: store i32
-; CHECK: store i32
+; CHECK: store <2 x i32> <i32 456, i32 123>, <2 x i32> addrspace(3)* %1, align 2
 define void @merge_local_store_2_constants_i32_align_2(i32 addrspace(3)* %out) #0 {
----------------
This is no longer vectorized with the above changes. I will update it with the other tests.


http://reviews.llvm.org/D21935





More information about the llvm-commits mailing list