LSV: Fix adjust alloca alignment trick for AMDGPU
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 18 Sep 2018 02:05:44 +0000 (02:05 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 18 Sep 2018 02:05:44 +0000 (02:05 +0000)
commitc64079859767f30319bd3ceb93e36f35e2dc0b17
treee9199d63d81c006f2aa19f186377dee6f629e7cb
parentf1b0b47b2d04d9c4d5f0ed0f9970181ef52b0241
LSV: Fix adjust alloca alignment trick for AMDGPU

This was checking the hardcoded address space 0 for the stack.
Additionally, this should be checking for legality with
the adjusted alignment, so defer the alignment check.

Also try to split if the unaligned access isn't allowed.

llvm-svn: 342442
llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/adjust-alloca-alignment.ll