[DirectX] Allow llvm.assume intrinsic to pass on to DXIL (#165311)

fixes #165051

Change is just to let the assume intrinsic pass on unmodified. Test is
to confirm the DXIL disassembler doesn't blow up whe we generate DXIL
with this intrinsic.
This commit is contained in:
Farzon Lotfi
2025-10-27 22:11:05 -07:00
committed by GitHub
parent 76e2963f3c
commit dc76ac6071
2 changed files with 13 additions and 0 deletions

View File

@@ -904,6 +904,8 @@ public:
case Intrinsic::dx_resource_casthandle:
// NOTE: llvm.dbg.value is supported as is in DXIL.
case Intrinsic::dbg_value:
// NOTE: llvm.assume is supported as is in DXIL.
case Intrinsic::assume:
case Intrinsic::not_intrinsic:
if (F.use_empty())
F.eraseFromParent();

View File

@@ -0,0 +1,11 @@
; RUN: llc --filetype=obj %s -o - | dxil-dis -o - | FileCheck %s
target triple = "dxil-pc-shadermodel6.7-library"
define void @test_llvm_assume(i1 %0) {
; CHECK-LABEL: test_llvm_assume
; CHECK-NEXT: tail call void @llvm.assume(i1 %0)
tail call void @llvm.assume(i1 %0)
ret void
}