xref: /openbsd-src/gnu/llvm/llvm/lib/Target/Mips/MipsTargetTransformInfo.cpp (revision d415bd752c734aee168c4ee86ff32e8cc249eb16)
1*d415bd75Srobert //===-- MipsTargetTransformInfo.cpp - Mips specific TTI ----------------===//
2*d415bd75Srobert //
3*d415bd75Srobert // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*d415bd75Srobert // See https://llvm.org/LICENSE.txt for license information.
5*d415bd75Srobert // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*d415bd75Srobert //
7*d415bd75Srobert //===----------------------------------------------------------------------===//
8*d415bd75Srobert 
9*d415bd75Srobert #include "MipsTargetTransformInfo.h"
10*d415bd75Srobert 
11*d415bd75Srobert using namespace llvm;
12*d415bd75Srobert 
hasDivRemOp(Type * DataType,bool IsSigned)13*d415bd75Srobert bool MipsTTIImpl::hasDivRemOp(Type *DataType, bool IsSigned) {
14*d415bd75Srobert   EVT VT = TLI->getValueType(DL, DataType);
15*d415bd75Srobert   return TLI->isOperationLegalOrCustom(IsSigned ? ISD::SDIVREM : ISD::UDIVREM,
16*d415bd75Srobert                                        VT);
17*d415bd75Srobert }
18