Teach all of the loads, stores, memsets and memcpys created by the
authorChandler Carruth <chandlerc@gmail.com>
Wed, 26 Sep 2012 10:27:46 +0000 (10:27 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 26 Sep 2012 10:27:46 +0000 (10:27 +0000)
commit81b001a2209be99e42aceed74f411c7cefc4d022
tree583604cd2f1285d573c80cfca401b9f2b94bc018
parent4d7aa6dbcedfbee7482b8473a63af5ac065380e8
Teach all of the loads, stores, memsets and memcpys created by the
rewriter in SROA to carry a proper alignment. This involves
interrogating various sources of alignment, etc. This is a more complete
and principled fix to PR13920 as well as related bugs pointed out by Eli
in review and by inspection in the area.

Also by inspection fix the integer and vector promotion paths to create
aligned loads and stores. I still need to work up test cases for
these... Sorry for the delay, they were found purely by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164689 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/SROA.cpp
test/Transforms/SROA/alignment.ll [new file with mode: 0644]
test/Transforms/SROA/basictest.ll