1 //===- DirectXTargetTransformInfo.cpp - DirectX TTI ---------------*- C++ 2 //-*-===// 3 // 4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5 // See https://llvm.org/LICENSE.txt for license information. 6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 // 8 //===----------------------------------------------------------------------===// 9 /// 10 //===----------------------------------------------------------------------===// 11 12 #include "DirectXTargetTransformInfo.h" 13 #include "llvm/IR/Intrinsics.h" 14 #include "llvm/IR/IntrinsicsDirectX.h" 15 16 using namespace llvm; 17 18 bool DirectXTTIImpl::isTargetIntrinsicWithScalarOpAtArg(Intrinsic::ID ID, 19 unsigned ScalarOpdIdx) { 20 switch (ID) { 21 default: 22 return false; 23 } 24 } 25 26 bool DirectXTTIImpl::isTargetIntrinsicTriviallyScalarizable( 27 Intrinsic::ID ID) const { 28 switch (ID) { 29 case Intrinsic::dx_frac: 30 case Intrinsic::dx_rsqrt: 31 return true; 32 default: 33 return false; 34 } 35 } 36