[DAGCombiner] Account for getVectorIdxTy() when narrowing vector load
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 5 May 2015 19:34:10 +0000 (19:34 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 5 May 2015 19:34:10 +0000 (19:34 +0000)
commit97dbeaa8d596f1b6963211f8e5683b4735d66ff8
tree5f9c5f21a01c17bd085b50d7f0215723b767e5b2
parentd32c49bf685f98088844d6a399965362870d0532
[DAGCombiner] Account for getVectorIdxTy() when narrowing vector load

This patch makes ReplaceExtractVectorEltOfLoadWithNarrowedLoad convert
the element number from getVectorIdxTy() to PtrTy before doing pointer
arithmetic on it.  This is needed on z, where element numbers are i32
but pointers are i64.

Original patch by Richard Sandiford.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/SystemZ/vec-extract-02.ll [new file with mode: 0644]