]> granicus.if.org Git - llvm/commit
[InstCombine] Correct the check for vector GEPs
authorMatthew Simpson <mssimpso@codeaurora.org>
Wed, 29 Mar 2017 18:23:08 +0000 (18:23 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Wed, 29 Mar 2017 18:23:08 +0000 (18:23 +0000)
commit946702101bf65d0f579cf6efbd7bc742e7caa70e
tree184eded44e06da39b764b0a0bc87fc11d0fbe050
parent37cb59fa3b7c9adc7ba57f7310de652632ef84d7
[InstCombine] Correct the check for vector GEPs

Some of the GEP combines (e.g., descaling) can't handle vector GEPs. We have an
existing check that attempts to bail out if given a vector GEP. However, the
check only tests the GEP's pointer operand. A GEP results in a vector of
pointers if at least one of its operands is vector-typed (e.g., its pointer
operand could be a scalar, but its index could be a vector). We should just
check the type of the GEP itself. This should fix PR32414.

Reference: https://bugs.llvm.org/show_bug.cgi?id=32414
Differential Revision: https://reviews.llvm.org/D31470

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299017 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/getelementptr.ll