diff options
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp index 5dca699827b..17609175951 100644 --- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp +++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp @@ -506,10 +506,8 @@ LegalizerInfo::findAction(const SizeAndActionsVec &Vec, const uint32_t Size) { // Find the last element in Vec that has a bitsize equal to or smaller than // the requested bit size. // That is the element just before the first element that is bigger than Size. - auto VecIt = llvm::upper_bound( - Vec, Size, [](const uint32_t Size, const SizeAndAction lhs) -> bool { - return Size < lhs.first; - }); + auto VecIt = llvm::bsearch( + Vec, [=](const SizeAndAction &A) { return Size < A.first; }); assert(VecIt != Vec.begin() && "Does Vec not start with size 1?"); --VecIt; int VecIdx = VecIt - Vec.begin(); |

