[PATCH] D152386: [LoadStoreVectorizer] Only upgrade align for alloca

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 13:48:43 PDT 2023


bjope added inline comments.


================
Comment at: llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/adjust-alloca-alignment.ll:281
 define void @private_store_2xi16_align2_not_alloca(ptr addrspace(5) %p, ptr addrspace(5) %r) #0 {
-; CHECK-LABEL: @private_store_2xi16_align2_not_alloca(
-; ALIGNED-NEXT:  [[GEP_R:%.*]] = getelementptr i16, ptr addrspace(5) [[R:%.*]], i32 1
-; ALIGNED-NEXT:  store i16 1, ptr addrspace(5) [[R]], align 2
-; ALIGNED-NEXT:  store i16 2, ptr addrspace(5) [[GEP_R]], align 2
-; UNALIGNED-NEXT:store <2 x i16>
-; CHECK-NEXT:    ret void
+; ALIGNED-LABEL: @private_store_2xi16_align2_not_alloca(
+; ALIGNED-NEXT:    [[GEP_R:%.*]] = getelementptr i16, ptr addrspace(5) [[R:%.*]], i32 1
----------------
tra wrote:
> Nit: I'd suggest keeping the common  `CHECK-LABEL`, instead of replicating it for aligned/unaligned variants.
I only used the update script to re-generated the checks, and this is what I got.

If this test file shouldn't be based on automatically generated test checks, then I think you need to remove the first line saying
```
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
```
Otherwise people will end up updating this, e.g. when using the `-u` flag in utils/update_test_checks.py which afaik triggers on that line.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152386/new/

https://reviews.llvm.org/D152386



More information about the llvm-commits mailing list