]> granicus.if.org Git - llvm/commit
[InstCombine] Handle vector gep with scalar argument in evaluateInDifferentElementOrder
authorMikael Holmen <mikael.holmen@ericsson.com>
Mon, 1 Apr 2019 14:10:10 +0000 (14:10 +0000)
committerMikael Holmen <mikael.holmen@ericsson.com>
Mon, 1 Apr 2019 14:10:10 +0000 (14:10 +0000)
commit74746501d3a9d428bfced31ce13de55e776d7406
treefbbeecc53719f5c93bdf8dbade6755103b46155e
parent46c1976bb09355b6e5103fdef9941d8bff14717a
[InstCombine] Handle vector gep with scalar argument in evaluateInDifferentElementOrder

Summary:
This fixes PR41270.

The recursive function evaluateInDifferentElementOrder expects to be called
on a vector Value, so when we call it on a vector GEP's arguments, we must
first check that the argument is indeed a vector.

Reviewers: reames, spatel

Reviewed By: spatel

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60058

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357389 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/vec_gep_scalar_arg.ll [new file with mode: 0644]