Skip to content

[DXIL] Model DXIL Class specification of DXIL Ops in DXIL.td #87803

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
459 changes: 146 additions & 313 deletions llvm/lib/Target/DirectX/DXIL.td

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions llvm/lib/Target/DirectX/DXILOpBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,15 @@ Type *DXILOpBuilder::getOverloadTy(dxil::OpCode OpCode, FunctionType *FT) {
}
}

// Prop->OverloadParamIndex is 0, overload type is FT->getReturnType().
// Consider FT->getReturnType() as default overload type, unless
// Prop->OverloadParamIndex != 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment just repeats what the code does, which isn't useful. Better to word it at a higher level like "We use the return type as the overload type unless a specific parameter is specified" or something

Type *OverloadType = FT->getReturnType();
if (Prop->OverloadParamIndex != 0) {
// Skip Return Type.
OverloadType = FT->getParamType(Prop->OverloadParamIndex - 1);
}

auto ParamKinds = getOpCodeParameterKind(*Prop);
const auto *ParamKinds = getOpCodeParameterKind(*Prop);
auto Kind = ParamKinds[Prop->OverloadParamIndex];
// For ResRet and CBufferRet, OverloadTy is in field of StructType.
if (Kind == ParameterKind::CBufferRet ||
Expand Down
7 changes: 5 additions & 2 deletions llvm/lib/Target/DirectX/DXILOpBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ class DXILOpBuilder {
public:
DXILOpBuilder(Module &M, IRBuilderBase &B) : M(M), B(B) {}
/// Create an instruction that calls DXIL Op with return type, specified
/// opcode, and call arguments. \param OpCode Opcode of the DXIL Op call
/// constructed \param ReturnTy Return type of the DXIL Op call constructed
/// opcode, and call arguments.
///
/// \param OpCode Opcode of the DXIL Op call constructed
/// \param ReturnTy Return type of the DXIL Op call constructed
/// \param OverloadTy Overload type of the DXIL Op call constructed
/// \param Args Arguments for the DXIL Op call constructed
/// \return DXIL Op call constructed
CallInst *createDXILOpCall(dxil::OpCode OpCode, Type *ReturnTy,
Type *OverloadTy, SmallVector<Value *> Args);
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/abs.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add all of these triples to the tests? The current implementation doesn't key off of shader model or dxil versions at all.


; Make sure dxil operation function calls for abs are generated for int16_t/int/int64_t.

Expand Down
3 changes: 2 additions & 1 deletion llvm/test/CodeGen/DirectX/ceil.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for ceil are generated for float and half.

Expand All @@ -18,3 +18,4 @@ entry:

declare half @llvm.ceil.f16(half)
declare float @llvm.ceil.f32(float)

2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/ceil_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation ceil does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/clamp.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for clamp/uclamp are generated for half/float/double/i16/i32/i64.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/cos.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for cos are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/cos_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation cos does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/dot2_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation dot2 does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/dot3_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation dot3 does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/dot4_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation dot4 does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/exp.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for exp are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/exp2_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation exp2 does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
Expand Down
3 changes: 1 addition & 2 deletions llvm/test/CodeGen/DirectX/fabs.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for abs are generated for float, half, and double.


; CHECK-LABEL: fabs_half
define noundef half @fabs_half(half noundef %a) {
entry:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/fdot.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for dot are generated for int/uint vectors.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/floor.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for floor are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/floor_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation floor does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/fmax.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for fmax are generated for half/float/double.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/fmin.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for fmin are generated for half/float/double.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/frac_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation frac does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/idot.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK

; Make sure dxil operation function calls for dot are generated for int/uint vectors.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/isinf.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library < %s | FileCheck %s

; Make sure dxil operation function calls for isinf are generated for float and half.
; CHECK: call i1 @dx.op.isSpecialFloat.f32(i32 9, float %{{.*}})
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/isinf_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation isinf does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/log.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK

; Make sure dxil operation function calls for log are generated.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/log10.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK

; Make sure dxil operation function calls for log10 are generated.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/log2.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for log2 are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/log2_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation log2 does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/pow.ll
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
; RUN: opt -S -dxil-intrinsic-expansion < %s | FileCheck %s --check-prefixes=CHECK,EXPCHECK
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s --check-prefixes=CHECK,DOPCHECK

; Make sure dxil operation function calls for pow are generated.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/reversebits.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for reversebits are generated for all integer types.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/round.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for round are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/round_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; This test is expected to fail with the following error
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/rsqrt.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for rsqrt are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/rsqrt_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation rsqrt does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
25 changes: 12 additions & 13 deletions llvm/test/CodeGen/DirectX/sin.ll
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s -check-prefix=SM6_3
; SM6_3: call half @dx.op.unary.f16(i32 13, half %{{.*}})
; SM6_3: call float @dx.op.unary.f32(i32 13, float %{{.*}})

; Make sure dxil operation function calls for sin are generated for float and half.
; CHECK:call float @dx.op.unary.f32(i32 13, float %{{.*}})
; CHECK:call half @dx.op.unary.f16(i32 13, half %{{.*}})
; Function Attrs: noinline nounwind optnone
define noundef half @sin_half(half noundef %a) #0 {
entry:
%a.addr = alloca half, align 2
store half %a, ptr %a.addr, align 2
%0 = load half, ptr %a.addr, align 2
%1 = call half @llvm.sin.f16(half %0)
ret half %1
}

; Function Attrs: noinline nounwind optnone
define noundef float @sin_float(float noundef %a) #0 {
Expand All @@ -14,12 +22,3 @@ entry:
ret float %1
}

; Function Attrs: noinline nounwind optnone
define noundef half @sin_half(half noundef %a) #0 {
entry:
%a.addr = alloca half, align 2
store half %a, ptr %a.addr, align 2
%0 = load half, ptr %a.addr, align 2
%1 = call half @llvm.sin.f16(half %0)
ret half %1
}
8 changes: 5 additions & 3 deletions llvm/test/CodeGen/DirectX/sin_error.ll
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library %s 2>&1 | FileCheck %s --check-prefix=SM6_0_DOUBLE
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s --check-prefix=SM6_3_DOUBLE

; DXIL operation sin does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
; Double is not valid in any Shader Model version
; SM6_0_DOUBLE: LLVM ERROR: Invalid Overload
; SM6_3_DOUBLE: LLVM ERROR: Invalid Overload

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems unnecessary.

define noundef double @sin_double(double noundef %a) #0 {
entry:
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/smax.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for smax are generated for i16/i32/i64.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/smin.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for smin are generated for i16/i32/i64.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/sqrt.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for sqrt are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/sqrt_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation sqrt does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/tan.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library %s | FileCheck %s

; Make sure dxil operation function calls for tan are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/tan_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.0-library %s 2>&1 | FileCheck %s

; DXIL operation tan does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/trunc.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for trunc are generated for float and half.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/trunc_error.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s

; DXIL operation trunc does not support double overload type
; CHECK: LLVM ERROR: Invalid Overload Type
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/umax.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for umax are generated for i16/i32/i64.

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/DirectX/umin.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: opt -S -dxil-op-lower < %s | FileCheck %s
; RUN: opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s

; Make sure dxil operation function calls for umin are generated for i16/i32/i64.

Expand Down
Loading
Loading