brintos

brintos / llvm-project-archived public Read only

0
0
Text · 577 B · cb5fdef Raw
11 lines · plain
1; RUN: not opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s2; CHECK: RWStructuredBuffers may increment or decrement their counters, but not both.3 4define void @inc_and_dec() {5entry:6  %handle = call target("dx.RawBuffer", float, 1, 0) @llvm.dx.resource.handlefrombinding(i32 1, i32 2, i32 3, i32 4, ptr null)7  call i32 @llvm.dx.resource.updatecounter(target("dx.RawBuffer", float, 1, 0) %handle, i8 -1)8  call i32 @llvm.dx.resource.updatecounter(target("dx.RawBuffer", float, 1, 0) %handle, i8 1)9  ret void10}11