brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 4486368 Raw
24 lines · plain
1; RUN: opt -S -passes=load-store-vectorizer --mcpu=hawaii -mattr=+unaligned-access-mode,+unaligned-scratch-access,+max-private-element-size-16 < %s | FileCheck --match-full-lines %s2 3target triple = "amdgcn--"4 5@G = internal addrspace(5) global [8 x i16] undef, align 16 7; Verify that the alignment of the global remains at 1, even if we vectorize8; the stores.9;10; CHECK: @G = internal addrspace(5) global [8 x i16] undef, align 111 12define void @private_store_2xi16_align2_not_alloca(ptr addrspace(5) %p, ptr addrspace(5) %r) {13; CHECK: define void @private_store_2xi16_align2_not_alloca(ptr addrspace(5) [[P:%.*]], ptr addrspace(5) [[R:%.*]]) #0 {14; CHECK-NEXT:    [[GEP0:%.*]] = getelementptr i16, ptr addrspace(5) @G, i32 015; CHECK-NEXT:    store <2 x i16> <i16 1, i16 2>, ptr addrspace(5) [[GEP0]], align 116; CHECK-NEXT:    ret void17;18  %gep0 = getelementptr i16, ptr addrspace(5) @G, i32 019  %gep1 = getelementptr i16, ptr addrspace(5) @G, i32 120  store i16 1, ptr addrspace(5) %gep0, align 121  store i16 2, ptr addrspace(5) %gep1, align 122  ret void23}24