Skip to content

Commit f19dcf6

Browse files
committed
address pr comments
1 parent 3aacbd7 commit f19dcf6

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

llvm/lib/Target/DirectX/DXILOpLowering.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,12 +770,17 @@ class OpLowerer {
770770
continue;
771771
Intrinsic::ID ID = F.getIntrinsicID();
772772
switch (ID) {
773+
// NOTE: Skip dx_resource_casthandle here. They are
774+
// resolved after this loop in cleanupHandleCasts.
773775
case Intrinsic::dx_resource_casthandle:
776+
// NOTE: llvm.dbg.value is supported as is in DXIL.
777+
case Intrinsic::dbg_value:
774778
case Intrinsic::not_intrinsic:
775779
continue;
776780
default: {
777781
DiagnosticInfoUnsupported Diag(F, "Unknown intrinsic?");
778782
M.getContext().diagnose(Diag);
783+
HasErrors |= true;
779784
break;
780785
}
781786
#define DXIL_OP_INTRINSIC(OpCode, Intrin, ...) \

llvm/test/CodeGen/DirectX/unknown_intrinsic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: not opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
1+
; RUN: not opt -S -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s 2>&1 | FileCheck %s
22

33
; CHECK: error: <unknown>:0:0: in function llvm.vector.reduce.and.v4i32 i32 (<4 x i32>): Unknown intrinsic?
44
define i32 @fn_and(<4 x i32> %0) local_unnamed_addr #0 {

0 commit comments

Comments
 (0)