brintos

brintos / llvm-project-archived public Read only

0
0
Text · 863 B · ff03bf1 Raw
17 lines · plain
1; RUN: opt -S -dxil-op-lower %s | FileCheck %s2 3target triple = "dxil-pc-shadermodel6.6-compute"4 5define i32 @test_getdimensions_no_mips() {6  ; CHECK: %[[HANDLE:.*]] = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, 7  ; CHECK-NEXT: %[[ANNOT_HANDLE:.*]] = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %[[HANDLE]]8  %handle = call target("dx.TypedBuffer", <4 x float>, 0, 0, 0) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr null)9 10  ; CHECK-NEXT: %[[RETVAL:.*]] = call %dx.types.Dimensions @dx.op.getDimensions(i32 72, %dx.types.Handle %[[ANNOT_HANDLE]], i32 undef)11  ; CHECK-NEXT: %[[DIM:.*]] = extractvalue %dx.types.Dimensions %[[RETVAL]], 012  %1 = call i32 @llvm.dx.resource.getdimensions.x(target("dx.TypedBuffer", <4 x float>, 0, 0, 0) %handle)13  14  ; CHECK-NEXT: ret i32 %[[DIM]]15  ret i32 %116}17