
This adjusts the DXILOpBuilder API in a couple of ways: 1. Remove the need to call `getOverloadTy` before creating Ops 2. Introduce `tryCreateOp` to parallel `createOp` but propagate errors 3. Introduce specialized createOp methods for each DXIL Op This will simplify usage of the builder in upcoming changes, and also allows us to propagate errors via DiagnosticInfo rather than using fatal errors. Pull Request: https://github.com/llvm/llvm-project/pull/101250
15 lines
393 B
LLVM
15 lines
393 B
LLVM
; RUN: not opt -S -dxil-op-lower %s 2>&1 | FileCheck %s
|
|
|
|
; DXIL operation not valid for pixel stage
|
|
; CHECK: in function test_group_id
|
|
; CHECK-SAME: Cannot create GroupId operation: Invalid stage
|
|
|
|
target triple = "dxil-pc-shadermodel6.7-pixel"
|
|
|
|
; Function Attrs: noinline nounwind optnone
|
|
define i32 @test_group_id(i32 %a) #0 {
|
|
entry:
|
|
%0 = call i32 @llvm.dx.group.id(i32 %a)
|
|
ret i32 %0
|
|
}
|