7 Commits

Author SHA1 Message Date
Matt Arsenault
0b5646a61a LoadStoreVectorizer: Fix assert when merging pointer ops
This needs to use inttoptr/ptrtoint if combining an int and pointer
load. If a pointer is used always do an integer load.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 01:55:52 +00:00
Matt Arsenault
7e961b6fb8 LoadStoreVectorizer: Use AA metadata
This was not passing the full instruction with metadata
to the alias query.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 01:47:46 +00:00
Matt Arsenault
378e1693a1 LoadStoreVectorizer: if one element of a vector is integer, default to
integer.

Fixes issues on some architectures where we use arithmetic ops to build
vectors, which can cause bad things to happen for loads/stores of mixed
types.

Patch by Fiona Glaser

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274307 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 00:37:01 +00:00
Matt Arsenault
9de35f8460 LoadStoreVectorizer: Fix crashes on sub-byte types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274306 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-01 00:36:54 +00:00
Matt Arsenault
531c987fec LoadStoreVectorizer: Check skipFunction first.
Also add test I forgot to add to r274296.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274299 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 23:50:18 +00:00
Matt Arsenault
34f70b6118 LoadStoreVectorizer: Skip optnone functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 23:30:29 +00:00
Matt Arsenault
8b86030deb Add LoadStoreVectorizer pass
This was contributed by Apple, and I've been working on
minimal cleanups and generalizing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274293 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-30 23:11:38 +00:00