Skip to content

Commit 1bdec97

Browse files
authored
[DirectX] change makedouble return type to overloadTy (#141156)
Change makedouble return type to overloadTy so makedouble will match validator expectations Closes #140998
1 parent bbca78f commit 1bdec97

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,8 @@ def MakeDouble : DXILOp<101, makeDouble> {
965965
let Doc = "creates a double value";
966966
let intrinsics = [IntrinSelect<int_dx_asdouble>];
967967
let arguments = [Int32Ty, Int32Ty];
968-
let result = DoubleTy;
968+
let result = OverloadTy;
969+
let overloads = [Overloads<DXIL1_0, [DoubleTy]>];
969970
let stages = [Stages<DXIL1_0, [all_stages]>];
970971
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
971972
}

llvm/test/CodeGen/DirectX/asdouble.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
; DirectX op
55

66
define noundef double @asdouble_scalar(i32 noundef %low, i32 noundef %high) {
7-
; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low, i32 %high)
7+
; CHECK: call double @dx.op.makeDouble.f64(i32 101, i32 %low, i32 %high)
88
%ret = call double @llvm.dx.asdouble.i32(i32 %low, i32 %high)
99
ret double %ret
1010
}
1111

1212
declare double @llvm.dx.asdouble.i32(i32, i32)
1313

1414
define noundef <3 x double> @asdouble_vec(<3 x i32> noundef %low, <3 x i32> noundef %high) {
15-
; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i0, i32 %high.i0)
16-
; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i1, i32 %high.i1)
17-
; CHECK: call double @dx.op.makeDouble(i32 101, i32 %low.i2, i32 %high.i2)
15+
; CHECK: call double @dx.op.makeDouble.f64(i32 101, i32 %low.i0, i32 %high.i0)
16+
; CHECK: call double @dx.op.makeDouble.f64(i32 101, i32 %low.i1, i32 %high.i1)
17+
; CHECK: call double @dx.op.makeDouble.f64(i32 101, i32 %low.i2, i32 %high.i2)
1818
%ret = call <3 x double> @llvm.dx.asdouble.v3i32(<3 x i32> %low, <3 x i32> %high)
1919
ret <3 x double> %ret
2020
}

0 commit comments

Comments
 (0)