use TLI.allowsMemoryAccess() to check if memory accesses are fast; NFCI
authorSanjay Patel <spatel@rotateright.com>
Tue, 18 Aug 2015 22:48:12 +0000 (22:48 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 18 Aug 2015 22:48:12 +0000 (22:48 +0000)
commit85826bebece0bb53da548c0356ed591421fed250
treee4130b689ce551893ed277693e93985998e0dbb3
parentcca41d362fad71b9774ee1b2304ede0b4bf3f889
use TLI.allowsMemoryAccess() to check if memory accesses are fast; NFCI

This consolidates use of isUnalignedMem32Slow() in one place.
There is a slight change in logic although I'm not sure that it would ever
come up in the real world: we were assuming that an alignment of the type
size is always fast; now, we actually check the data layout to confirm that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245382 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp