Skip to content

Commit 751ca17

Browse files
committed
IGNORE: pre-requisite commit
- this contains all changes from dependent commits that have not been merged yet
1 parent deab4e9 commit 751ca17

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+492
-275
lines changed

llvm/lib/Target/DirectX/DXIL.td

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -266,18 +266,30 @@ def miss : DXILShaderStage;
266266
def all_stages : DXILShaderStage;
267267
// Denote support for DXIL Op to have been removed
268268
def removed : DXILShaderStage;
269+
269270
// DXIL Op attributes
270271

272+
// A function attribute denotes that there is a corresponding LLVM function
273+
// attribute that will be set when building the DXIL op. The mapping for
274+
// non-trivial cases is defined by setDXILAttribute in DXILOpBuilder.cpp
271275
class DXILAttribute;
272276

273-
def ReadOnly : DXILAttribute;
274277
def ReadNone : DXILAttribute;
275-
def IsDerivative : DXILAttribute;
276-
def IsGradient : DXILAttribute;
277-
def IsFeedback : DXILAttribute;
278-
def IsWave : DXILAttribute;
279-
def NeedsUniformInputs : DXILAttribute;
280-
def IsBarrier : DXILAttribute;
278+
def ReadOnly : DXILAttribute;
279+
def NoDuplicate : DXILAttribute;
280+
def NoReturn : DXILAttribute;
281+
282+
// A property is simply used to mark a DXIL op belongs to a sub-group of
283+
// DXIL ops, and it is used to query if a particular holds this property.
284+
// This is used for static analysis of DXIL ops.
285+
class DXILProperty;
286+
287+
def IsBarrier : DXILProperty;
288+
def IsDerivative : DXILProperty;
289+
def IsGradient : DXILProperty;
290+
def IsFeedback : DXILProperty;
291+
def IsWave : DXILProperty;
292+
def RequiresUniformInputs : DXILProperty;
281293

282294
class Overloads<Version ver, list<DXILOpParamType> ols> {
283295
Version dxil_version = ver;
@@ -291,7 +303,7 @@ class Stages<Version ver, list<DXILShaderStage> st> {
291303

292304
class Attributes<Version ver = DXIL1_0, list<DXILAttribute> attrs> {
293305
Version dxil_version = ver;
294-
list<DXILAttribute> op_attrs = attrs;
306+
list<DXILAttribute> fn_attrs = attrs;
295307
}
296308

297309
// Abstraction DXIL Operation
@@ -322,6 +334,9 @@ class DXILOp<int opcode, DXILOpClass opclass> {
322334

323335
// Versioned attributes of operation
324336
list<Attributes> attributes = [];
337+
338+
// List of properties. Default to no properties.
339+
list<DXILProperty> properties = [];
325340
}
326341

327342
// Concrete definitions of DXIL Operations
@@ -729,6 +744,7 @@ def CreateHandle : DXILOp<57, createHandle> {
729744
let arguments = [Int8Ty, Int32Ty, Int32Ty, Int1Ty];
730745
let result = HandleTy;
731746
let stages = [Stages<DXIL1_0, [all_stages]>, Stages<DXIL1_6, [removed]>];
747+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
732748
}
733749

734750
def BufferLoad : DXILOp<68, bufferLoad> {
@@ -740,6 +756,7 @@ def BufferLoad : DXILOp<68, bufferLoad> {
740756
[Overloads<DXIL1_0,
741757
[ResRetHalfTy, ResRetFloatTy, ResRetInt16Ty, ResRetInt32Ty]>];
742758
let stages = [Stages<DXIL1_0, [all_stages]>];
759+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
743760
}
744761

745762
def BufferStore : DXILOp<69, bufferStore> {
@@ -768,6 +785,7 @@ def CheckAccessFullyMapped : DXILOp<71, checkAccessFullyMapped> {
768785
let result = Int1Ty;
769786
let overloads = [Overloads<DXIL1_0, [Int32Ty]>];
770787
let stages = [Stages<DXIL1_0, [all_stages]>];
788+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
771789
}
772790

773791
def Discard : DXILOp<82, discard> {
@@ -842,8 +860,8 @@ def Dot4AddI8Packed : DXILOp<163, dot4AddPacked> {
842860
let LLVMIntrinsic = int_dx_dot4add_i8packed;
843861
let arguments = [Int32Ty, Int32Ty, Int32Ty];
844862
let result = Int32Ty;
845-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
846863
let stages = [Stages<DXIL1_0, [all_stages]>];
864+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
847865
}
848866

849867
def Dot4AddU8Packed : DXILOp<164, dot4AddPacked> {
@@ -852,22 +870,24 @@ def Dot4AddU8Packed : DXILOp<164, dot4AddPacked> {
852870
let LLVMIntrinsic = int_dx_dot4add_u8packed;
853871
let arguments = [Int32Ty, Int32Ty, Int32Ty];
854872
let result = Int32Ty;
855-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
856873
let stages = [Stages<DXIL1_0, [all_stages]>];
874+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
857875
}
858876

859877
def AnnotateHandle : DXILOp<216, annotateHandle> {
860878
let Doc = "annotate handle with resource properties";
861879
let arguments = [HandleTy, ResPropsTy];
862880
let result = HandleTy;
863881
let stages = [Stages<DXIL1_6, [all_stages]>];
882+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
864883
}
865884

866885
def CreateHandleFromBinding : DXILOp<217, createHandleFromBinding> {
867886
let Doc = "create resource handle from binding";
868887
let arguments = [ResBindTy, Int32Ty, Int1Ty];
869888
let result = HandleTy;
870889
let stages = [Stages<DXIL1_6, [all_stages]>];
890+
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
871891
}
872892

873893
def WaveActiveAnyTrue : DXILOp<113, waveAnyTrue> {
@@ -876,6 +896,7 @@ def WaveActiveAnyTrue : DXILOp<113, waveAnyTrue> {
876896
let arguments = [Int1Ty];
877897
let result = Int1Ty;
878898
let stages = [Stages<DXIL1_0, [all_stages]>];
899+
let properties = [IsWave];
879900
}
880901

881902
def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> {
@@ -884,7 +905,7 @@ def WaveIsFirstLane : DXILOp<110, waveIsFirstLane> {
884905
let arguments = [];
885906
let result = Int1Ty;
886907
let stages = [Stages<DXIL1_0, [all_stages]>];
887-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
908+
let properties = [IsWave];
888909
}
889910

890911
def WaveReadLaneAt: DXILOp<117, waveReadLaneAt> {
@@ -894,7 +915,7 @@ def WaveReadLaneAt: DXILOp<117, waveReadLaneAt> {
894915
let result = OverloadTy;
895916
let overloads = [Overloads<DXIL1_0, [HalfTy, FloatTy, DoubleTy, Int1Ty, Int16Ty, Int32Ty, Int64Ty]>];
896917
let stages = [Stages<DXIL1_0, [all_stages]>];
897-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
918+
let properties = [IsWave];
898919
}
899920

900921
def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
@@ -903,7 +924,8 @@ def WaveGetLaneIndex : DXILOp<111, waveGetLaneIndex> {
903924
let arguments = [];
904925
let result = Int32Ty;
905926
let stages = [Stages<DXIL1_0, [all_stages]>];
906-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
927+
let attributes = [Attributes<DXIL1_0, [ReadOnly]>];
928+
let properties = [IsWave];
907929
}
908930

909931
def WaveAllBitCount : DXILOp<135, waveAllOp> {
@@ -912,5 +934,5 @@ def WaveAllBitCount : DXILOp<135, waveAllOp> {
912934
let arguments = [Int1Ty];
913935
let result = Int32Ty;
914936
let stages = [Stages<DXIL1_0, [all_stages]>];
915-
let attributes = [Attributes<DXIL1_0, [ReadNone]>];
937+
let properties = [IsWave];
916938
}

llvm/lib/Target/DirectX/DXILConstants.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,16 @@ enum class OpParamType : unsigned {
3030
#include "DXILOperation.inc"
3131
};
3232

33+
enum class Attribute : unsigned {
34+
#define DXIL_ATTRIBUTE(Name) Name,
35+
#include "DXILOperation.inc"
36+
};
37+
38+
enum class Property : unsigned {
39+
#define DXIL_PROPERTY(Name) Name,
40+
#include "DXILOperation.inc"
41+
};
42+
3343
} // namespace dxil
3444
} // namespace llvm
3545

llvm/lib/Target/DirectX/DXILOpBuilder.cpp

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct OpStage {
5454

5555
struct OpAttribute {
5656
Version DXILVersion;
57-
uint32_t ValidAttrs;
57+
llvm::SmallVector<dxil::Attribute> ValidAttrs;
5858
};
5959

6060
static const char *getOverloadTypeName(OverloadKind Kind) {
@@ -159,6 +159,7 @@ struct OpCodeProperty {
159159
llvm::SmallVector<OpOverload> Overloads;
160160
llvm::SmallVector<OpStage> Stages;
161161
llvm::SmallVector<OpAttribute> Attributes;
162+
llvm::SmallVector<dxil::Property> Properties;
162163
int OverloadParamIndex; // parameter index which control the overload.
163164
// When < 0, should be only 1 overload type.
164165
};
@@ -367,6 +368,20 @@ static std::optional<size_t> getPropIndex(ArrayRef<T> PropList,
367368
return std::nullopt;
368369
}
369370

371+
static void setDXILAttribute(CallInst *CI, dxil::Attribute Attr) {
372+
switch (Attr) {
373+
case dxil::Attribute::ReadNone:
374+
return CI->setDoesNotAccessMemory();
375+
case dxil::Attribute::ReadOnly:
376+
return CI->setOnlyReadsMemory();
377+
case dxil::Attribute::NoReturn:
378+
return CI->setDoesNotReturn();
379+
case dxil::Attribute::NoDuplicate:
380+
return CI->setCannotDuplicate();
381+
}
382+
llvm_unreachable("Invalid function attribute specified for DXIL operation");
383+
}
384+
370385
namespace llvm {
371386
namespace dxil {
372387

@@ -461,7 +476,17 @@ Expected<CallInst *> DXILOpBuilder::tryCreateOp(dxil::OpCode OpCode,
461476
OpArgs.push_back(IRB.getInt32(llvm::to_underlying(OpCode)));
462477
OpArgs.append(Args.begin(), Args.end());
463478

464-
return IRB.CreateCall(DXILFn, OpArgs, Name);
479+
// Create the function call instruction
480+
CallInst *CI = IRB.CreateCall(DXILFn, OpArgs, Name);
481+
482+
// We then need to attach available function attributes
483+
for (auto OpAttr : Prop->Attributes)
484+
if (VersionTuple(OpAttr.DXILVersion.Major, OpAttr.DXILVersion.Minor) <=
485+
DXILVersion)
486+
for (auto Attr : OpAttr.ValidAttrs)
487+
setDXILAttribute(CI, Attr);
488+
489+
return CI;
465490
}
466491

467492
CallInst *DXILOpBuilder::createOp(dxil::OpCode OpCode, ArrayRef<Value *> Args,

llvm/test/CodeGen/DirectX/BufferLoad.ll

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define void @loadv4f32() {
1616
; The temporary casts should all have been cleaned up
1717
; CHECK-NOT: %dx.cast_handle
1818

19-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
19+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR:]]
2020
%data0 = call <4 x float> @llvm.dx.typedBufferLoad(
2121
target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %buffer, i32 0)
2222

@@ -33,7 +33,7 @@ define void @loadv4f32() {
3333
call void @scalar_user(float %data0_0)
3434
call void @scalar_user(float %data0_2)
3535

36-
; CHECK: [[DATA4:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 4, i32 undef)
36+
; CHECK: [[DATA4:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 4, i32 undef) #[[#ATTR]]
3737
%data4 = call <4 x float> @llvm.dx.typedBufferLoad(
3838
target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %buffer, i32 4)
3939

@@ -47,7 +47,7 @@ define void @loadv4f32() {
4747
; CHECK: insertelement <4 x float>
4848
call void @vector_user(<4 x float> %data4)
4949

50-
; CHECK: [[DATA12:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 12, i32 undef)
50+
; CHECK: [[DATA12:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 12, i32 undef) #[[#ATTR]]
5151
%data12 = call <4 x float> @llvm.dx.typedBufferLoad(
5252
target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %buffer, i32 12)
5353

@@ -69,7 +69,7 @@ define void @index_dynamic(i32 %bufindex, i32 %elemindex) {
6969
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v4f32_0_0_0(
7070
i32 0, i32 0, i32 1, i32 0, i1 false)
7171

72-
; CHECK: [[LOAD:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 %bufindex, i32 undef)
72+
; CHECK: [[LOAD:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 %bufindex, i32 undef) #[[#ATTR]]
7373
%load = call <4 x float> @llvm.dx.typedBufferLoad(
7474
target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %buffer, i32 %bufindex)
7575

@@ -104,7 +104,7 @@ define void @loadf32() {
104104
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_f32_0_0_0(
105105
i32 0, i32 0, i32 1, i32 0, i1 false)
106106

107-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
107+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
108108
%data0 = call float @llvm.dx.typedBufferLoad(
109109
target("dx.TypedBuffer", float, 0, 0, 0) %buffer, i32 0)
110110

@@ -122,7 +122,7 @@ define void @loadv2f32() {
122122
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v2f32_0_0_0(
123123
i32 0, i32 0, i32 1, i32 0, i1 false)
124124

125-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
125+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
126126
%data0 = call <2 x float> @llvm.dx.typedBufferLoad(
127127
target("dx.TypedBuffer", <2 x float>, 0, 0, 0) %buffer, i32 0)
128128

@@ -136,12 +136,12 @@ define void @loadv4f32_checkbit() {
136136
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v4f32_0_0_0(
137137
i32 0, i32 0, i32 1, i32 0, i1 false)
138138

139-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
139+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
140140
%data0 = call {<4 x float>, i1} @llvm.dx.typedBufferLoad.checkbit.f32(
141141
target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %buffer, i32 0)
142142

143143
; CHECK: [[STATUS:%.*]] = extractvalue %dx.types.ResRet.f32 [[DATA0]], 4
144-
; CHECK: [[MAPPED:%.*]] = call i1 @dx.op.checkAccessFullyMapped.i32(i32 71, i32 [[STATUS]]
144+
; CHECK: [[MAPPED:%.*]] = call i1 @dx.op.checkAccessFullyMapped.i32(i32 71, i32 [[STATUS]]) #[[#ATTR]]
145145
%check = extractvalue {<4 x float>, i1} %data0, 1
146146

147147
; CHECK: call void @check_user(i1 [[MAPPED]])
@@ -157,7 +157,7 @@ define void @loadv4i32() {
157157
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v4i32_0_0_0(
158158
i32 0, i32 0, i32 1, i32 0, i1 false)
159159

160-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.i32 @dx.op.bufferLoad.i32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
160+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.i32 @dx.op.bufferLoad.i32(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
161161
%data0 = call <4 x i32> @llvm.dx.typedBufferLoad(
162162
target("dx.TypedBuffer", <4 x i32>, 0, 0, 0) %buffer, i32 0)
163163

@@ -171,7 +171,7 @@ define void @loadv4f16() {
171171
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v4f16_0_0_0(
172172
i32 0, i32 0, i32 1, i32 0, i1 false)
173173

174-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f16 @dx.op.bufferLoad.f16(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
174+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.f16 @dx.op.bufferLoad.f16(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
175175
%data0 = call <4 x half> @llvm.dx.typedBufferLoad(
176176
target("dx.TypedBuffer", <4 x half>, 0, 0, 0) %buffer, i32 0)
177177

@@ -185,9 +185,11 @@ define void @loadv4i16() {
185185
@llvm.dx.handle.fromBinding.tdx.TypedBuffer_v4i16_0_0_0(
186186
i32 0, i32 0, i32 1, i32 0, i1 false)
187187

188-
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.i16 @dx.op.bufferLoad.i16(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef)
188+
; CHECK: [[DATA0:%.*]] = call %dx.types.ResRet.i16 @dx.op.bufferLoad.i16(i32 68, %dx.types.Handle [[HANDLE]], i32 0, i32 undef) #[[#ATTR]]
189189
%data0 = call <4 x i16> @llvm.dx.typedBufferLoad(
190190
target("dx.TypedBuffer", <4 x i16>, 0, 0, 0) %buffer, i32 0)
191191

192192
ret void
193193
}
194+
195+
; CHECK: attributes #[[#ATTR]] = {{{.*}} memory(read) {{.*}}}

llvm/test/CodeGen/DirectX/BufferStore.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ define void @storefloat(<4 x float> %data, i32 %index) {
1717
; CHECK: [[DATA0_1:%.*]] = extractelement <4 x float> %data, i32 1
1818
; CHECK: [[DATA0_2:%.*]] = extractelement <4 x float> %data, i32 2
1919
; CHECK: [[DATA0_3:%.*]] = extractelement <4 x float> %data, i32 3
20-
; CHECK: call void @dx.op.bufferStore.f32(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, float [[DATA0_0]], float [[DATA0_1]], float [[DATA0_2]], float [[DATA0_3]], i8 15)
20+
; CHECK: call void @dx.op.bufferStore.f32(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, float [[DATA0_0]], float [[DATA0_1]], float [[DATA0_2]], float [[DATA0_3]], i8 15){{$}}
2121
call void @llvm.dx.typedBufferStore(
2222
target("dx.TypedBuffer", <4 x float>, 1, 0, 0) %buffer,
2323
i32 %index, <4 x float> %data)
@@ -37,7 +37,7 @@ define void @storeint(<4 x i32> %data, i32 %index) {
3737
; CHECK: [[DATA0_1:%.*]] = extractelement <4 x i32> %data, i32 1
3838
; CHECK: [[DATA0_2:%.*]] = extractelement <4 x i32> %data, i32 2
3939
; CHECK: [[DATA0_3:%.*]] = extractelement <4 x i32> %data, i32 3
40-
; CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, i32 [[DATA0_0]], i32 [[DATA0_1]], i32 [[DATA0_2]], i32 [[DATA0_3]], i8 15)
40+
; CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, i32 [[DATA0_0]], i32 [[DATA0_1]], i32 [[DATA0_2]], i32 [[DATA0_3]], i8 15){{$}}
4141
call void @llvm.dx.typedBufferStore(
4242
target("dx.TypedBuffer", <4 x i32>, 1, 0, 0) %buffer,
4343
i32 %index, <4 x i32> %data)
@@ -60,7 +60,7 @@ define void @storehalf(<4 x half> %data, i32 %index) {
6060
; CHECK: [[DATA0_1:%.*]] = extractelement <4 x half> %data, i32 1
6161
; CHECK: [[DATA0_2:%.*]] = extractelement <4 x half> %data, i32 2
6262
; CHECK: [[DATA0_3:%.*]] = extractelement <4 x half> %data, i32 3
63-
; CHECK: call void @dx.op.bufferStore.f16(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, half [[DATA0_0]], half [[DATA0_1]], half [[DATA0_2]], half [[DATA0_3]], i8 15)
63+
; CHECK: call void @dx.op.bufferStore.f16(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, half [[DATA0_0]], half [[DATA0_1]], half [[DATA0_2]], half [[DATA0_3]], i8 15){{$}}
6464
call void @llvm.dx.typedBufferStore(
6565
target("dx.TypedBuffer", <4 x half>, 1, 0, 0) %buffer,
6666
i32 %index, <4 x half> %data)
@@ -83,7 +83,7 @@ define void @storei16(<4 x i16> %data, i32 %index) {
8383
; CHECK: [[DATA0_1:%.*]] = extractelement <4 x i16> %data, i32 1
8484
; CHECK: [[DATA0_2:%.*]] = extractelement <4 x i16> %data, i32 2
8585
; CHECK: [[DATA0_3:%.*]] = extractelement <4 x i16> %data, i32 3
86-
; CHECK: call void @dx.op.bufferStore.i16(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, i16 [[DATA0_0]], i16 [[DATA0_1]], i16 [[DATA0_2]], i16 [[DATA0_3]], i8 15)
86+
; CHECK: call void @dx.op.bufferStore.i16(i32 69, %dx.types.Handle [[HANDLE]], i32 %index, i32 undef, i16 [[DATA0_0]], i16 [[DATA0_1]], i16 [[DATA0_2]], i16 [[DATA0_3]], i8 15){{$}}
8787
call void @llvm.dx.typedBufferStore(
8888
target("dx.TypedBuffer", <4 x i16>, 1, 0, 0) %buffer,
8989
i32 %index, <4 x i16> %data)

llvm/test/CodeGen/DirectX/WaveActiveAnyTrue.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
define noundef i1 @wave_any_simple(i1 noundef %p1) {
44
entry:
5-
; CHECK: call i1 @dx.op.waveAnyTrue(i32 113, i1 %p1)
5+
; CHECK: call i1 @dx.op.waveAnyTrue(i32 113, i1 %p1){{$}}
66
%ret = call i1 @llvm.dx.wave.any(i1 %p1)
77
ret i1 %ret
88
}

llvm/test/CodeGen/DirectX/WaveActiveCountBits.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
define void @main(i1 %expr) {
44
entry:
5-
; CHECK: call i32 @dx.op.waveAllOp(i32 135, i1 %expr)
5+
; CHECK: call i32 @dx.op.waveAllOp(i32 135, i1 %expr){{$}}
66
%0 = call i32 @llvm.dx.wave.active.countbits(i1 %expr)
77
ret void
88
}

0 commit comments

Comments
 (0)