diff options
author | Nikolai Bozhenov <nikolai.bozhenov@intel.com> | 2017-10-18 09:28:09 +0000 |
---|---|---|
committer | Nikolai Bozhenov <nikolai.bozhenov@intel.com> | 2017-10-18 09:28:09 +0000 |
commit | 74c047eabb17b75cac6d6e9537b8e6e51e750880 (patch) | |
tree | e981c5d8946f48aa35314c1fd94d740248c5d8cc /llvm/unittests/Support/MemoryTest.cpp | |
parent | 480892b75fc15ee435b4b689a0021bb5f5fd7166 (diff) | |
download | bcm5719-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