OSDN Git Service

SROA: Handle casts involving vectors of pointers and integer scalars.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 21 Sep 2013 20:36:04 +0000 (20:36 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 21 Sep 2013 20:36:04 +0000 (20:36 +0000)
commit1ce1525ed453aea78d17f28ec3c353d0cde5341f
tree1d6f090c1c7026a055b54d349b8c3e14fe70e724
parent189c6235e7d783928c94cbfe4bccb39e4bd0b84f
SROA: Handle casts involving vectors of pointers and integer scalars.

SROA wants to convert any types of equivalent widths but it's not possible to
convert vectors of pointers to an integer scalar with a single cast. As a
workaround we add a bitcast to the corresponding int ptr type first. This type
of cast used to be an edge case but has become common with SLP vectorization.
Fixes PR17271.

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