summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/Support/MemoryTest.cpp
diff options
context:
space:
mode:
authorNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-10-18 09:28:09 +0000
committerNikolai Bozhenov <nikolai.bozhenov@intel.com>2017-10-18 09:28:09 +0000
commit74c047eabb17b75cac6d6e9537b8e6e51e750880 (patch)
treee981c5d8946f48aa35314c1fd94d740248c5d8cc /llvm/unittests/Support/MemoryTest.cpp
parent480892b75fc15ee435b4b689a0021bb5f5fd7166 (diff)
downloadbcm5719-llvm-74c047eabb17b75cac6d6e9537b8e6e51e750880.tar.gz
bcm5719-llvm-74c047eabb17b75cac6d6e9537b8e6e51e750880.zip
Improve lookThroughCast function.
Summary: When we have the following case: %cond = cmp iN %x, CmpConst %tr = trunc iN %x to iK %narrowsel = select i1 %cond, iK %t, iK C We could possibly match only min/max pattern after looking through cast. So it is more profitable if widened C constant will be equal CmpConst. That is why just set widened C constant equal to CmpConst, because there is a further check in this function that trunc CmpConst == C. Also description for lookTroughCast function was added. Reviewers: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38536 Patch by: Artur Gainullin <artur.gainullin@intel.com> llvm-svn: 316070
Diffstat (limited to 'llvm/unittests/Support/MemoryTest.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud