brintos

brintos / llvm-project-archived public Read only

0
0
Text · 900 B · edef06b Raw
23 lines · plain
1; RUN: opt -S -passes='dxil-post-optimization-validation' -mtriple=dxil-pc-shadermodel6.6-compute %s 2>&1 | FileCheck %s2; This is a valid code, it checks the limits of a binding space3 4; CHECK-NOT: error:5 6%__cblayout_CB = type <{ float }>7 8@CB.str = private unnamed_addr constant [3 x i8] c"CB\00", align 19 10define void @CSMain() "hlsl.shader"="compute" {11entry:12  %CB = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 4, 0)) @llvm.dx.resource.handlefrombinding(i32 0, i32 4294967294, i32 1, i32 0, ptr nonnull @CB.str)13  %CB1 = tail call target("dx.CBuffer", target("dx.Layout", %__cblayout_CB, 4, 0)) @llvm.dx.resource.handlefrombinding(i32 0, i32 0, i32 1, i32 0, ptr nonnull @CB.str)14  ret void15}16 17!dx.rootsignatures = !{!0}18 19!0 = !{ptr @CSMain, !1, i32 2}20!1 = !{!2, !3}21!2 = !{!"RootCBV", i32 0, i32 4294967294, i32 0, i32 4}22!3 = !{!"RootCBV", i32 0, i32 0, i32 0, i32 4}23