summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/Analysis.cpp
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2016-10-27 14:29:28 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2016-10-27 14:29:28 +0000
commit01e755eab11e45e3356f767b9fee66c1f986261c (patch)
tree3ef4ddb37fd72a426ec2b9f94698e6e4450a098c /llvm/lib/CodeGen/Analysis.cpp
parente0bde7554ce04ef7af99c69d526882a56f54a928 (diff)
downloadbcm5719-llvm-01e755eab11e45e3356f767b9fee66c1f986261c.tar.gz
bcm5719-llvm-01e755eab11e45e3356f767b9fee66c1f986261c.zip
[DAGCombiner] Add vector demanded elements support to computeKnownBits
Currently computeKnownBits returns the common known zero/one bits for all elements of vector data, when we may only be interested in one/some of the elements. This patch adds a DemandedElts argument that allows us to specify the elements we actually care about. The original computeKnownBits implementation calls with a DemandedElts demanding all elements to match current behaviour. Scalar types set this to 1. The approach was found to be easier than trying to add a per-element known bits solution, for a similar usefulness given the combines where computeKnownBits is typically used. I've only added support for a few opcodes so far (the ones that have proven straightforward to test), all others will default to demanding all elements but can be updated in due course. DemandedElts support could similarly be added to computeKnownBitsForTargetNode in a future commit. Differential Revision: https://reviews.llvm.org/D25691 llvm-svn: 285296
Diffstat (limited to 'llvm/lib/CodeGen/Analysis.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud