[LoadStoreVectorizer] Consider if operation is faster than before
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Thu, 21 Apr 2022 23:45:19 +0000 (16:45 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 28 Nov 2022 23:52:32 +0000 (15:52 -0800)
commitc46634554d507b6b764eeba881ed4eef3b28baac
treeb3e9ca8c8ae9b1ef4f159abd54ff10300bf53b8f
parent55378ae87cce07c8897f9a0abb4a7edfed387696
[LoadStoreVectorizer] Consider if operation is faster than before

Compare a relative speed of misaligned accesses before and
after vectorization, not just check the new instruction is
not going to be slower.

Since no target now returns anything but 0 or 1 for Fast
argument of the allowsMisalignedMemoryAccesses this is still NFCI.

The subsequent patch will tune actual vaues of Fast on AMDGPU.

Differential Revision: https://reviews.llvm.org/D124218
llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp