Update TableGen specification of DXIL Op records in DXIL.td per the current design document. - Facilitate specification of overloads, shader stage and attributes predicated on DXIL Ops predicated DXIL version. Implement functionality to consume in TableGen backend, DXILEmitter, the above specification enhancements, and generate C++ code (in (DXILOperations.inc) that represents properties of DXIL Ops, associated type declarations and corresponding accessor functions. Changes to DXIL Op Lowering pass to consume the DXIL Op representation generated by the TableGen back end. Add mtriple with the required shader model version to commandline of tests.
14 lines
385 B
LLVM
14 lines
385 B
LLVM
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
|
|
|
|
; DXIL operation not valid for library stage
|
|
; CHECK: LLVM ERROR: library : Invalid Shader Stage for DXIL operation - ThreadId
|
|
|
|
target triple = "dxil-pc-shadermodel6.7-library"
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_thread_id(i32 %a) #0 {
|
|
entry:
|
|
%0 = call i32 @llvm.dx.thread.id(i32 %a)
|
|
ret i32 %0
|
|
}
|