mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[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:
@@ -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();
|
||||
|
||||
11
llvm/test/tools/dxil-dis/llvm_assume.ll
Normal file
11
llvm/test/tools/dxil-dis/llvm_assume.ll
Normal 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user