]> granicus.if.org Git - llvm/commit
LoadStoreVectorizer: Split even sized illegal chains properly
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 23 Feb 2017 03:58:53 +0000 (03:58 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 23 Feb 2017 03:58:53 +0000 (03:58 +0000)
commit210095c5c9a679a0e083f6fca8a9853dc02b16bc
treea1950349d1016b8ddaa4fc5f10d8ebf541ce333c
parent59900325da7965a3ef5b9c519ffa55a880d8266e
LoadStoreVectorizer: Split even sized illegal chains properly

Implement isLegalToVectorizeLoadChain for AMDGPU to avoid
producing private address spaces accesses that will need to be
split up later. This was doing the wrong thing in the case
where the queried chain was an even number of elements.

A possible <4 x i32> store was being split into
store <2 x i32>
store i32
store i32

rather than
store <2 x i32>
store <2 x i32>

when legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@295933 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
test/Transforms/LoadStoreVectorizer/AMDGPU/adjust-alloca-alignment.ll
test/Transforms/LoadStoreVectorizer/AMDGPU/merge-stores-private.ll