diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2019-08-20 20:50:12 +0000 |
| commit | e6d1592492a3a379186bfb02bd0f4eda0669c0d5 (patch) | |
| tree | 599ab169a01f1c86eda9adc774edaedde2f2db5b /lib/Target/X86/X86InstrFMA3Info.cpp | |
| parent | 1a56a5ead7a2e84bee8240f5f6b033b5f1707154 (diff) | |
Notes
Diffstat (limited to 'lib/Target/X86/X86InstrFMA3Info.cpp')
| -rw-r--r-- | lib/Target/X86/X86InstrFMA3Info.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/Target/X86/X86InstrFMA3Info.cpp b/lib/Target/X86/X86InstrFMA3Info.cpp index def732a2dd00..25bbdddb7a21 100644 --- a/lib/Target/X86/X86InstrFMA3Info.cpp +++ b/lib/Target/X86/X86InstrFMA3Info.cpp @@ -1,9 +1,8 @@ //===-- X86InstrFMA3Info.cpp - X86 FMA3 Instruction Information -----------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -57,7 +56,7 @@ using namespace llvm; #define FMA3GROUP_SCALAR(Name, Attrs) \ FMA3GROUP_SCALAR_WIDTHS(Name, SD, Attrs) \ - FMA3GROUP_SCALAR_WIDTHS(Name, SS, Attrs) \ + FMA3GROUP_SCALAR_WIDTHS(Name, SS, Attrs) #define FMA3GROUP_FULL(Name, Attrs) \ FMA3GROUP_PACKED(Name, Attrs) \ @@ -159,11 +158,9 @@ const X86InstrFMA3Group *llvm::getFMA3Group(unsigned Opcode, uint64_t TSFlags) { // FMA 231 instructions have an opcode of 0xB6-0xBF unsigned FormIndex = ((BaseOpcode - 0x90) >> 4) & 0x3; - auto I = std::lower_bound(Table.begin(), Table.end(), Opcode, - [FormIndex](const X86InstrFMA3Group &Group, - unsigned Opcode) { - return Group.Opcodes[FormIndex] < Opcode; - }); + auto I = partition_point(Table, [=](const X86InstrFMA3Group &Group) { + return Group.Opcodes[FormIndex] < Opcode; + }); assert(I != Table.end() && I->Opcodes[FormIndex] == Opcode && "Couldn't find FMA3 opcode!"); return I; |
