]> granicus.if.org Git - llvm/commit
[InstCombine] Allow values with multiple users in SimplifyDemandedVectorElts
authorPiotr Sobczak <piotr.sobczak@amd.com>
Mon, 21 Oct 2019 08:12:47 +0000 (08:12 +0000)
committerPiotr Sobczak <piotr.sobczak@amd.com>
Mon, 21 Oct 2019 08:12:47 +0000 (08:12 +0000)
commitec10cb25d93412b1ca0da354f9b52fe4fdfccc87
tree8589a5cd5634feb9056146785950c27ddbea1afc
parent919bed3ee7cfb3d62eb89c6c9205dece376024d6
[InstCombine] Allow values with multiple users in SimplifyDemandedVectorElts

Summary:
Allow for ignoring the check for a single use in SimplifyDemandedVectorElts
to be able to simplify operands if DemandedElts is known to contain
the union of elements used by all users.
It is a responsibility of a caller of SimplifyDemandedVectorElts to
supply correct DemandedElts.

Simplify a series of extractelement instructions if only a subset of
elements is used.

Reviewers: reames, arsenm, majnemer, nhaehnle

Reviewed By: nhaehnle

Subscribers: wdng, jvesely, nhaehnle, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375395 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
lib/Transforms/InstCombine/InstCombineVectorOps.cpp
test/Transforms/InstCombine/AMDGPU/amdgcn-demanded-vector-elts.ll