
Line ending policies were changed in the parent, dccebddb3b80. To make it easier to resolve downstream merge conflicts after line-ending policies are adjusted this is a separate whitespace-only commit. If you have merge conflicts as a result, you can simply `git add --renormalize -u && git merge --continue` or `git add --renormalize -u && git rebase --continue` - depending on your workflow.
39 lines
1.1 KiB
C++
39 lines
1.1 KiB
C++
//===- DirectXTargetTransformInfo.cpp - DirectX TTI ---------------*- C++
|
|
//-*-===//
|
|
//
|
|
// 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "DirectXTargetTransformInfo.h"
|
|
#include "llvm/IR/Intrinsics.h"
|
|
#include "llvm/IR/IntrinsicsDirectX.h"
|
|
|
|
using namespace llvm;
|
|
|
|
bool DirectXTTIImpl::isTargetIntrinsicWithScalarOpAtArg(Intrinsic::ID ID,
|
|
unsigned ScalarOpdIdx) {
|
|
switch (ID) {
|
|
case Intrinsic::dx_wave_readlane:
|
|
return ScalarOpdIdx == 1;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
bool DirectXTTIImpl::isTargetIntrinsicTriviallyScalarizable(
|
|
Intrinsic::ID ID) const {
|
|
switch (ID) {
|
|
case Intrinsic::dx_frac:
|
|
case Intrinsic::dx_rsqrt:
|
|
case Intrinsic::dx_wave_readlane:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|